GHSA-7jfh-2xc9-ccv7: Public Cross-Site Scripting Vulnerability
LOWGHSA-7jfh-2xc9-ccv7 is a LOW cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Public libraries in the npm ecosystem. The issue involves cross-site scripting in public. Remediation is available by upgrading affected packages to version 0.1.4.
GHSA-7jfh-2xc9-ccv7 at a Glance
How to Fix GHSA-7jfh-2xc9-ccv7
To remediate this vulnerability, upgrade all affected Public 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 public@0.1.4
npm install public@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls public
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-7jfh-2xc9-ccv7, inspect your project dependencies using npm:
npm ls public
Analyze the terminal output to locate any version of Public in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.4), your application is affected.
Note: The npm ls public 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 Public, 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-7jfh-2xc9-ccv7 Affected Public Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
public
|
npm |
< 0.1.4
|
0.1.4
|
|
public
|
npm |
0.1.5
All 1 versions
0.1.5
|
None specified
|
References
Frequently Asked Questions
What is GHSA-7jfh-2xc9-ccv7?
Which Public versions are affected?
What version fixes GHSA-7jfh-2xc9-ccv7?
Is public affected?
What CWE is associated with GHSA-7jfh-2xc9-ccv7?
How can I check npm dependencies for GHSA-7jfh-2xc9-ccv7?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7jfh-2xc9-ccv7",
"modified" : "2020-08-31T18:29:45Z",
"published" : "2019-05-31T23:46:40Z",
"aliases" : [ ],
"summary" : "Cross-Site Scripting in public",
"details" : "All versions of `public` are vulnerable to stored cross-site scripting (XSS). \n\n\n## Recommendation\n\nNo fix is currently available for this vulnerability. It is our recommendation to not install or use this module at this time.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "public"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "public"
},
"versions" : [ "0.1.5" ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://hackerone.com/reports/316346"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/609"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2019-05-31T23:44:38Z",
"nvd_published_at" : null
}
}