GHSA-h6p3-p4vx-wr8q dompurify vulnerable to Cross-site Scripting

Not scored Published

An attacker can execute arbitrary JavaScript in a victim's browser via nested headlines in sanitized HTML content.

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-h6p3-p4vx-wr8q?

GHSA-h6p3-p4vx-wr8q is a cross-site scripting vulnerability in dompurify, published on 11 Jan 2023. 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

dompurify prior to version 2.2.3 is vulnerable to a cross-site scripting problem caused by nested headlines.

Which versions are affected by GHSA-h6p3-p4vx-wr8q?

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

PackageAffectedFixed in
dompurify PyPIAll versions2.2.3
dompurify PyPIAll versions2.2.3

How do I fix GHSA-h6p3-p4vx-wr8q?

Upgrade dompurify to 2.2.3 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-h6p3-p4vx-wr8q being exploited?

There is no known exploitation of GHSA-h6p3-p4vx-wr8q in the wild and no public exploit code.

Sources

Is GHSA-h6p3-p4vx-wr8q in your software?

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

Check your SBOMs for free