GHSA-q324-q795-2q5p: @redocly/openapi cli Path Traversal Vulnerability
LOWGHSA-q324-q795-2q5p is a LOW path traversal vulnerability (General Security Weakness) affecting @redocly/openapi cli libraries in the npm ecosystem. The issue involves path traversal when using `preview-docs` when working dir contains files with question mark `?` in name. Remediation is available by upgrading affected packages to version 1.0.0-beta.59.
GHSA-q324-q795-2q5p at a Glance
How to Fix GHSA-q324-q795-2q5p
To remediate this vulnerability, upgrade all affected @redocly/openapi cli dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @redocly/openapi-cli@1.0.0-beta.59
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @redocly/openapi-cli
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-q324-q795-2q5p, inspect your project dependencies using npm:
npm ls @redocly/openapi-cli
Analyze the terminal output to locate any version of @redocly/openapi cli in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.0-beta.59), your application is affected.
Note: The npm ls @redocly/openapi-cli command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In @redocly/openapi cli, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-q324-q795-2q5p Affected @redocly/openapi cli Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@redocly/openapi-cli
|
npm |
< 1.0.0-beta.59
|
1.0.0-beta.59
|
References
Frequently Asked Questions
What is GHSA-q324-q795-2q5p?
Which @redocly/openapi cli versions are affected?
What version fixes GHSA-q324-q795-2q5p?
Is @redocly/openapi-cli affected?
What CWE is associated with GHSA-q324-q795-2q5p?
How can I check npm dependencies for GHSA-q324-q795-2q5p?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q324-q795-2q5p",
"modified" : "2021-10-11T18:40:44Z",
"published" : "2021-10-12T16:05:11Z",
"aliases" : [ ],
"summary" : "Path traversal when using `preview-docs` when working dir contains files with question mark `?` in name",
"details" : "### Impact\n`preview-docs` command allows path traversal if current working dir contains files with question mark `?` in name and attacker knows the name.\n\n### Patches\nIt was patched starting from 1.0.0-beta.59\n\n### Workarounds\nDo not run openapi-cli preview-docs command in the folder which contains files with question mark `?` in name.\n\n### References\nhttps://github.com/Redocly/openapi-cli/pull/347\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [@redocly/openapi-cli](https://github.com/Redocly/openapi-cli)\n* Email us at [security@redocly.com](mailto:security@redocly.com)\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@redocly/openapi-cli"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.0-beta.59"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.0.0-beta.58"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Redocly/openapi-cli/security/advisories/GHSA-q324-q795-2q5p"
}, {
"type" : "WEB",
"url" : "https://github.com/Redocly/openapi-cli/pull/347"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Redocly/openapi-cli"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2021-10-11T18:40:44Z",
"nvd_published_at" : null
}
}