CVE-2024-45801
Executive Summary
DOMPurify, a widely used DOM-only XSS sanitizer for HTML, MathML, and SVG, has a critical flaw that allows attackers to bypass its depth‑checking mechanism through specially crafted nested HTML and prototype pollution techniques. This bypass enables cross‑site scripting (XSS) attacks, undermining the library’s core purpose of sanitizing user input. The issue is fixed in DOMPurify versions 2.5.4 and 3.1.3; all users are urged to upgrade immediately as no workarounds exist.
Authoritative CVE Metadata
- CVSS Base Score: 6.1 (MEDIUM)
- Status: Modified
- Last Modified: 27-11-26
Original 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.