GHSA-cx7r-634m-2q2h: Harp Cross-Site Scripting Vulnerability

MODERATE
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-cx7r-634m-2q2h
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Harp
Package Ecosystem npm
Published Date
Last Updated

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.

harp fixed: Latest secure release
npm install harp@Latest secure release
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 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

# Withdrawn This advisory has been withdrawn per request from the maintainer. Given harp is a static webserver, a XSS type of vulnerability is not appropriate. ### Original advisory description All 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. ## Recommendation No fix is currently available. Consider using an alternative module until a fix is made available.

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?
GHSA-cx7r-634m-2q2h is a security vulnerability in Harp involving Cross-Site Scripting in harp under General Security Weakness.
Which Harp versions are affected?
Affected versions include releases prior to current release patches across affected packages: harp.
What version fixes GHSA-cx7r-634m-2q2h?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is harp affected?
Yes, harp is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with GHSA-cx7r-634m-2q2h?
GHSA-cx7r-634m-2q2h is classified under General Security Weakness.
How can I check npm dependencies for GHSA-cx7r-634m-2q2h?
Run the dependency tree command: 'npm ls harp'. 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-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
  }
}