CVE-2024-45801 Tampering by prototype polution in DOMPurify
Attackers can bypass DOMPurify's depth checks via prototype pollution to execute cross-site scripting attacks, requiring users to upgrade the library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-45801?
CVE-2024-45801 is a high-severity cross-site scripting vulnerability in cure53 DOMPurify, published on 16 Sep 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. It has been discovered that malicious HTML using special nesting techniques can bypass the depth checking added to DOMPurify in recent releases. It was also possible to use Prototype Pollution to weaken the depth check. This renders dompurify unable to avoid cross site scripting (XSS) attacks. This issue has been addressed in versions 2.5.4 and 3.1.3 of DOMPurify. All users are advised to upgrade. There are no known workarounds for this vulnerability.
Which versions are affected by CVE-2024-45801?
4 open source packages ship an affected version, including dompurify. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
dompurify npm | All versions | 2.5.4 |
dompurify npm | All versions | 2.5.4 |
dompurify npm | From 3.0.0 | 3.1.3 |
dompurify npm | From 3.0.0 | 3.1.3 |
Products include Cure53 Dompurify.
How do I fix CVE-2024-45801?
Upgrade dompurify to a fixed version for your release line: 2.5.4 or 3.1.3.
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 CVE-2024-45801 being exploited?
There is no known exploitation of CVE-2024-45801 in the wild and no public exploit code.
Other vulnerabilities in cure53 DOMPurify
- CVE-2024-47875 DOMPurify nesting-based mXSS
- CVE-2024-48910 DOMPurify vulnerable to tampering by prototype polution
- CVE-2026-47423 DOMPurify XSS via `selectedcontent` re-clone
- CVE-2026-49978 DOMPurify IN_PLACE Sanitization Bypass via Attached Shadow Root Inside <template>.content
- CVE-2026-49458 DOMPurify: Cross-realm IN_PLACE sanitization leaves executable markup intact via realm-bound `instanceof` checks
Sources
Also known as DEBIAN-CVE-2024-45801, GHSA-mmhx-hmjr-r674, MINI-q7cx-7c9m-56pp, UBUNTU-CVE-2024-45801.