GHSA-9pr3-7449-977r: Express cart Cross-Site Scripting Vulnerability
LOWGHSA-9pr3-7449-977r is a LOW cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Express cart libraries in the npm ecosystem. The issue involves cross-site scripting in express-cart. Remediation is available in the latest vendor maintenance releases.
GHSA-9pr3-7449-977r at a Glance
How to Fix GHSA-9pr3-7449-977r
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@Latest secure release
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-9pr3-7449-977r, 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 the patched release), 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. 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-9pr3-7449-977r Affected Express cart Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
express-cart
|
npm |
|
|
References
Frequently Asked Questions
What is GHSA-9pr3-7449-977r?
Which Express cart versions are affected?
What version fixes GHSA-9pr3-7449-977r?
Is express-cart affected?
What CWE is associated with GHSA-9pr3-7449-977r?
How can I check npm dependencies for GHSA-9pr3-7449-977r?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9pr3-7449-977r",
"modified" : "2020-08-31T18:36:31Z",
"published" : "2020-09-02T18:21:26Z",
"aliases" : [ ],
"summary" : "Cross-Site Scripting in express-cart",
"details" : "All versions of `harp` are vulnerable to Cross-Site Scripting. In the admin page it is possible to inject arbitrary JavaScript as a new product option, allowing attackers to execute arbitrary code. This is limited to the admin page and does not affect other pages.\n\n\n## Recommendation\n\nNo fix is currently available. Consider using an alternative module until a fix is made available.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "express-cart"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://hackerone.com/reports/395944"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/808"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:36:31Z",
"nvd_published_at" : null
}
}