Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm
Not in CISA KEV

Path traversal when using `preview-docs` when working dir contains files with question mark `?` in nameGHSA-q324-q795-2q5p

Fix: Redocly/openapi-cli#347

GHSA-q324-q795-2q5p is a security vulnerability in @redocly/openapi-cli. A fix is available for @redocly/openapi-cli — see the affected versions and patch details below.

Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 11, 2021 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, a proxy for how much of the ecosystem is exposed.

@redocly/openapi-clinpm
52Kdownloads / week

Description

Impact

preview-docs command allows path traversal if current working dir contains files with question mark ? in name and attacker knows the name.

Patches

It was patched starting from 1.0.0-beta.59

Workarounds

Do not run openapi-cli preview-docs command in the folder which contains files with question mark ? in name.

References

https://github.com/Redocly/openapi-cli/pull/347

For more information

If you have any questions or comments about this advisory:

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npm@redocly/openapi-cliall versions1.0.0-beta.59npm install @redocly/openapi-cli@1.0.0-beta.59

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @redocly/openapi-cli, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update @redocly/openapi-cli to 1.0.0-beta.59 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-q324-q795-2q5p is resolved across your whole dependency graph.

  3. Workarounds

    Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.

Frequently Asked Questions

### Impact `preview-docs` command allows path traversal if current working dir contains files with question mark `?` in name and attacker knows the name. ### Patches It was patched starting from 1.0.0-beta.59 ### Workarounds Do not run openapi-cli preview-docs command in the folder which contains files with question mark `?` in name. ### References https://github.com/Redocly/openapi-cli/pull/347 ### For more information If you have any questions or comments about this advisory: * Open an issue in [@redocly/openapi-cli](https://github.com/Redocly/openapi-cli) * Email us at [security@redocly
O3 Security · Impact-Aware SCA

Is GHSA-q324-q795-2q5p in your dependencies?

Find it across npm, including transitive dependencies.

Path traversal when using `preview-docs` when working…