Vulnerabilities in pkg:npm/superstatic
PACKAGEGHSA-wm77-q74p-5763 is a HIGH path traversal vulnerability (CWE-177: Improper Handling of URL Encoding (Hex Encoding)) affecting Superstatic libraries in the npm ecosystem. The issue involves path traversal in superstatic. Remediation is available by upgrading affected packages to version 5.0.2.
pkg:npm/superstatic
Vulnerability advisories affecting package pkg:npm/superstatic. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-wm77-q74p-5763 | - | HIGH | Path Traversal in superstatic |
GHSA-wm77-q74p-5763 at a Glance
How to Fix GHSA-wm77-q74p-5763
To remediate this vulnerability, upgrade all affected Superstatic 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 superstatic@5.0.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls superstatic
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-wm77-q74p-5763, inspect your project dependencies using npm:
npm ls superstatic
Analyze the terminal output to locate any version of Superstatic in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.0.2), your application is affected.
Note: The npm ls superstatic 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-177: Improper Handling of URL Encoding (Hex Encoding), where the product does not properly handle when all or part of an input has been url encoded. In Superstatic, 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-wm77-q74p-5763 Affected Superstatic Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
superstatic
|
npm |
< 5.0.2
|
5.0.2
|
References
Frequently Asked Questions
What is GHSA-wm77-q74p-5763?
Which Superstatic versions are affected?
What version fixes GHSA-wm77-q74p-5763?
Is superstatic affected?
What CWE is associated with GHSA-wm77-q74p-5763?
How can I check npm dependencies for GHSA-wm77-q74p-5763?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wm77-q74p-5763",
"modified" : "2021-08-09T22:21:02Z",
"published" : "2018-07-27T17:06:03Z",
"aliases" : [ ],
"summary" : "Path Traversal in superstatic",
"details" : "Affected of `superstatic` are vulnerable to path traversal when used on Windows. \n\nAdditionally, it is vulnerable to path traversal on other platforms combined with certain Node.js versions which erroneously normalize `\\\\` to `/` in paths on all platforms (a known example being Node.js v9.9.0).\n\n\n## Recommendation\n\nUpdate to version 5.0.2 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "superstatic"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.0.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/firebase/superstatic/pull/255"
}, {
"type" : "WEB",
"url" : "https://github.com/firebase/superstatic/commit/e396ff62f588732989137d6c40d46b310e51ef2b"
}, {
"type" : "WEB",
"url" : "https://github.com/firebase/superstatic/blob/v5.0.1/lib/providers/fs.js#L71"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/652"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-177" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T22:00:48Z",
"nvd_published_at" : null
}
}