GHSA-wm77-q74p-5763: Superstatic Path Traversal Vulnerability

HIGH
CWE-177
Published
Advisory Summary

GHSA-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.

GHSA-wm77-q74p-5763 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-wm77-q74p-5763
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-177: Improper Handling of URL Encoding (Hex Encoding)
Affected Product Superstatic
Package Ecosystem npm
Published Date
Last Updated

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.

superstatic fixed: 5.0.2
npm install superstatic@5.0.2
Verify Direct and Transitive Dependencies

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

Affected of `superstatic` are vulnerable to path traversal when used on Windows. Additionally, 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). ## Recommendation Update to version 5.0.2 or later.

GHSA-wm77-q74p-5763 Affected Superstatic Versions

1 component(s)
Fixed Versions:
5.0.2
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?
GHSA-wm77-q74p-5763 is a security vulnerability in Superstatic involving Path Traversal in superstatic under CWE-177: Improper Handling of URL Encoding (Hex Encoding).
Which Superstatic versions are affected?
Affected versions include releases prior to 5.0.2 across affected packages: superstatic.
What version fixes GHSA-wm77-q74p-5763?
Upgrading to 5.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is superstatic affected?
Yes, superstatic is affected in releases prior to 5.0.2. Upgrade your dependency to 5.0.2 or later.
What CWE is associated with GHSA-wm77-q74p-5763?
GHSA-wm77-q74p-5763 is classified under CWE-177: Improper Handling of URL Encoding (Hex Encoding) (The product does not properly handle when all or part of an input has been URL encoded.).
How can I check npm dependencies for GHSA-wm77-q74p-5763?
Run the dependency tree command: 'npm ls superstatic'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}