GHSA-8h8v-6qqm-fwpq: Express cart Path Traversal Vulnerability

HIGH
CWE-22
Published
Advisory Summary

GHSA-8h8v-6qqm-fwpq is a HIGH path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Express cart libraries in the npm ecosystem. The issue involves path traversal in express-cart. Remediation is available by upgrading affected packages to version 1.1.7.

GHSA-8h8v-6qqm-fwpq at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-8h8v-6qqm-fwpq
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Express cart
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-8h8v-6qqm-fwpq

To remediate this vulnerability, upgrade all affected Express cart dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

express-cart fixed: 1.1.7
npm install express-cart@1.1.7
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 express-cart

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-8h8v-6qqm-fwpq, inspect your project dependencies using npm:

npm ls express-cart

Analyze the terminal output to locate any version of Express cart in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.7), your application is affected.

Note: The npm ls express-cart 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 Express cart, 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

Versions of `express-cart` before 1.1.7 are vulnerable to Path Traversal. ## Recommendation Update to version 1.1.7 or later.

GHSA-8h8v-6qqm-fwpq Affected Express cart Versions

1 component(s)
Fixed Versions:
1.1.7
Product / Package Ecosystem Affected Versions Fixed Version
express-cart
npm
< 1.1.7
1.1.7

References

Frequently Asked Questions

What is GHSA-8h8v-6qqm-fwpq?
GHSA-8h8v-6qqm-fwpq is a security vulnerability in Express cart involving Path Traversal in express-cart under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Express cart versions are affected?
Affected versions include releases prior to 1.1.7 across affected packages: express-cart.
What version fixes GHSA-8h8v-6qqm-fwpq?
Upgrading to 1.1.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is express-cart affected?
Yes, express-cart is affected in releases prior to 1.1.7. Upgrade your dependency to 1.1.7 or later.
What CWE is associated with GHSA-8h8v-6qqm-fwpq?
GHSA-8h8v-6qqm-fwpq is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (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.).
How can I check npm dependencies for GHSA-8h8v-6qqm-fwpq?
Run the dependency tree command: 'npm ls express-cart'. 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-8h8v-6qqm-fwpq",
  "modified" : "2020-08-31T18:32:22Z",
  "published" : "2020-09-01T21:06:38Z",
  "aliases" : [ ],
  "summary" : "Path Traversal in express-cart",
  "details" : "Versions of `express-cart` before 1.1.7 are vulnerable to Path Traversal.\n\n\n## Recommendation\n\nUpdate to version 1.1.7 or later.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "express-cart"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.1.7"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.1.5"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/343726"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/676"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T18:32:22Z",
    "nvd_published_at" : null
  }
}