GHSA-f8rq-m28h-8hxj Cross-Site Scripting in htmr

Not scored Published

An attacker can execute arbitrary JavaScript in a victim's browser via DOM-based XSS in the htmr library, requiring an upgrade to mitigate.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is GHSA-f8rq-m28h-8hxj?

GHSA-f8rq-m28h-8hxj is a cross-site scripting vulnerability in htmr, published on 3 Sep 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Versions of htmr prior to 0.8.7 are vulnerable to Cross-Site Scripting (XSS). The package uses innerHTML to unescape HTML entities. This may lead to DOM-based XSS through HTML-encoded XSS payloads. This may allow an attacker to execute arbitrary JavaScript in a victim's browser.

Recommendation

Upgrade to version 0.8.7 or later.

Which versions are affected by GHSA-f8rq-m28h-8hxj?

2 open source packages ship an affected version, including htmr.

PackageAffectedFixed in
htmr npmAll versions0.8.7
htmr npmAll versions0.8.7

How do I fix GHSA-f8rq-m28h-8hxj?

Upgrade htmr to 0.8.7 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is GHSA-f8rq-m28h-8hxj being exploited?

There is no known exploitation of GHSA-f8rq-m28h-8hxj in the wild and no public exploit code.

Sources

Is GHSA-f8rq-m28h-8hxj in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free