GHSA-4x7w-frcq-v4m3: @wturyn/swagger injector Path Traversal Vulnerability
CRITICALGHSA-4x7w-frcq-v4m3 is a CRITICAL path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting @wturyn/swagger injector libraries in the npm ecosystem. The issue involves path traversal in @wturyn/swagger-injector. Remediation is available in the latest vendor maintenance releases.
GHSA-4x7w-frcq-v4m3 at a Glance
How to Fix GHSA-4x7w-frcq-v4m3
To remediate this vulnerability, upgrade all affected @wturyn/swagger injector 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 @wturyn/swagger-injector@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @wturyn/swagger-injector
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-4x7w-frcq-v4m3, inspect your project dependencies using npm:
npm ls @wturyn/swagger-injector
Analyze the terminal output to locate any version of @wturyn/swagger injector in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls @wturyn/swagger-injector 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 CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In @wturyn/swagger injector, 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-4x7w-frcq-v4m3 Affected @wturyn/swagger injector Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@wturyn/swagger-injector
|
npm |
≥ 0.0.0
|
|
References
Frequently Asked Questions
What is GHSA-4x7w-frcq-v4m3?
Which @wturyn/swagger injector versions are affected?
What version fixes GHSA-4x7w-frcq-v4m3?
Is @wturyn/swagger-injector affected?
What CWE is associated with GHSA-4x7w-frcq-v4m3?
How can I check npm dependencies for GHSA-4x7w-frcq-v4m3?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4x7w-frcq-v4m3",
"modified" : "2020-08-31T18:49:56Z",
"published" : "2020-09-03T20:38:47Z",
"aliases" : [ ],
"summary" : "Path Traversal in @wturyn/swagger-injector",
"details" : "All versions of `@wturyn/swagger-injector` are vulnerable to Path Traversal. The package fails to sanitize URLs, allowing attackers to access server files outside of the configured `dist` folder using relative paths.\n\n\n## Recommendation\n\nNo fix is currently available. Consider using an alternative package until a fix is made available.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@wturyn/swagger-injector"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1173"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:49:56Z",
"nvd_published_at" : null
}
}