GHSA-cx7r-634m-2q2h: Harp Cross-Site Scripting Vulnerability
MODERATEGHSA-cx7r-634m-2q2h is a MODERATE cross-site scripting vulnerability (General Security Weakness) affecting Harp libraries in the npm ecosystem. The issue involves cross-site scripting in harp. Remediation is available in the latest vendor maintenance releases.
GHSA-cx7r-634m-2q2h at a Glance
How to Fix GHSA-cx7r-634m-2q2h
To remediate this vulnerability, upgrade all affected Harp 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 harp@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls harp
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-cx7r-634m-2q2h, inspect your project dependencies using npm:
npm ls harp
Analyze the terminal output to locate any version of Harp 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 harp 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 General Security Weakness. In Harp, 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-cx7r-634m-2q2h Affected Harp Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
harp
|
npm |
|
|
References
Frequently Asked Questions
What is GHSA-cx7r-634m-2q2h?
Which Harp versions are affected?
What version fixes GHSA-cx7r-634m-2q2h?
Is harp affected?
What CWE is associated with GHSA-cx7r-634m-2q2h?
How can I check npm dependencies for GHSA-cx7r-634m-2q2h?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cx7r-634m-2q2h",
"modified" : "2021-06-01T22:21:08Z",
"published" : "2020-09-02T18:20:21Z",
"withdrawn" : "2021-06-01T22:21:08Z",
"aliases" : [ ],
"summary" : "Cross-Site Scripting in harp",
"details" : "# Withdrawn\n\nThis advisory has been withdrawn per request from the maintainer. Given harp is a static webserver, a XSS type of vulnerability is not appropriate.\n\n### Original advisory description\n\nAll versions of `harp` are vulnerable to Cross-Site Scripting. Due to misconfiguration of its rendering engine, `harp` does not sanitize the HTML output allowing attackers to run arbitrary JavaScript when processing malicious files.\n\n\n## Recommendation\n\nNo fix is currently available. Consider using an alternative module until a fix is made available.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "harp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://hackerone.com/reports/453795"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/806"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:36:27Z",
"nvd_published_at" : null
}
}