Description
DOMPurify 3.1.3 through 3.3.1 and 2.5.3 through 2.5.8, fixed in commit 2726c74, contain a cross-site scripting vulnerability that allows attackers to bypass attribute sanitization by exploiting five missing rawtext elements (noscript, xmp, noembed, noframes, iframe) in the SAFE_FOR_XML regex. Attackers can include payloads like </noscript><img src=x onerror=alert(1)> in attribute values to execute JavaScript when sanitized output is placed inside these unprotected rawtext contexts.
References (6)
Core 6
Core References
Various Sources product
https://github.com/cure53/DOMPurify
Release Notes release-notes
VulnCheck Advisory: DOMPurify XSS via Missing Rawtext Elements in SAFE_FOR_XML
https://github.com/cure53/DOMPurify/releases/tag/3.3.2
Third Party Advisory third-party-advisory
https://fluidattacks.com/advisories/daft
Third Party Advisory third-party-advisory
https://www.vulncheck.com/advisories/dompurify-xss-via-missing-rawtext-elements-in-safe-for-xml
Scores
CVSS v3
6.1
EPSS
0.0001
EPSS Percentile
1.9%
Attack Vector
NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CISA SSVC
Vulnrichment
Exploitation
none
Automatable
no
Technical Impact
partial
Details
CWE
CWE-79
Status
published
Products (4)
cure53/dompurify
2.5.3 - 2.5.8
cure53/DOMPurify
2.5.3 - 2.5.8
cure53/DOMPurify
3.1.3 - 3.3.1
npm/dompurify
3.1.3npm
Published
Mar 03, 2026
Tracked Since
Mar 04, 2026