# harp cross-site scripting in HTML rendering

Source: https://junglewise.ai/threats/harp-cross-site-scripting-in-html-rendering-8724b1a6  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2020-09-02. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

Severity: info · Published 2020-09-02

harp is a static web server that serves files to clients. Due to a rendering engine misconfiguration, the server failed to sanitize HTML output, allowing attackers to inject arbitrary JavaScript code. An attacker could craft malicious files that, when processed by harp, would execute JavaScript in the context of clients visiting the served pages, potentially leading to session hijacking, credential theft, or malware distribution.

Technologies: [harp (npm)](https://junglewise.ai/threats/technologies/harp). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Informational severity, published 2 September 2020.

**Which products and versions are affected?** harp (npm) SEMVER:introduced=0.

**Is there a fix for This vulnerability?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is This vulnerability attacked?** It is attacked with local access, in a software library.

**Am I affected?** Check whether you run harp (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability is a cross-site scripting (XSS) flaw in harp's HTML rendering engine. The root cause is the failure to sanitize HTML output when processing files, allowing attackers to inject arbitrary JavaScript that executes in the context of clients. The attack requires the ability to place or influence malicious files on a server running harp; no network-level authentication bypass is needed, but the attacker must have file control or influence over harp's input. All versions of harp are reported affected. The advisory was withdrawn in 2021 by the maintainer on the grounds that, as a static web server, an XSS classification was deemed inappropriate—suggesting the vulnerability may have been misclassified or the risk reconsidered.

## Affected products

- harp harp all versions

## Timeline

- 2020-09-02: disclosed
- 2021-06-01: other: Advisory withdrawn by maintainer

## References

- [https://hackerone.com/reports/453795](https://hackerone.com/reports/453795)
- [https://www.npmjs.com/advisories/806](https://www.npmjs.com/advisories/806)

## Related threats

- [Harp path traversal via symlinks](https://junglewise.ai/threats/cve-2019-5438-harp-path-traversal-via-symlinks)
- [harp unauthorized file access via URL encoding bypass](https://junglewise.ai/threats/cve-2019-5437-harp-unauthorized-file-access-via-url-encoding-bypass)
