GHSA-8h8v-6qqm-fwpq: Express cart Path Traversal Vulnerability
HIGHGHSA-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
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.
npm install express-cart@1.1.7
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
GHSA-8h8v-6qqm-fwpq Affected Express cart Versions
1 component(s)| 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?
Which Express cart versions are affected?
What version fixes GHSA-8h8v-6qqm-fwpq?
Is express-cart affected?
What CWE is associated with GHSA-8h8v-6qqm-fwpq?
How can I check npm dependencies for GHSA-8h8v-6qqm-fwpq?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}