{"id":"CVE-2026-0540","published":"2026-03-03T17:26:06Z","modified":"2026-03-25T15:52:12Z","title":"DOMPurify XSS via Missing Rawtext Elements in SAFE_FOR_XML","vendor":"cure53","product":"DOMPurify","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00388,"percentile":0.32906,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/cure53/DOMPurify","tags":["product"]},{"url":"https://github.com/cure53/DOMPurify/commit/302b51de22535cc90235472c52e3401bedd46f80","tags":["patch"]},{"url":"https://github.com/cure53/DOMPurify/releases/tag/3.3.2","tags":["release-notes"]},{"url":"https://fluidattacks.com/advisories/daft","tags":["third-party-advisory"]},{"url":"https://www.vulncheck.com/advisories/dompurify-xss-via-missing-rawtext-elements-in-safe-for-xml","tags":["third-party-advisory"]}],"priority":{"score":10.9,"factors":[{"name":"EPSS percentile","points":6.58},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"cure53","affectedVersions":[{"vendor":"cure53","product":"DOMPurify","versions":[">= 3.1.3, <= 3.3.1",">= 2.5.3, <= 2.5.8"]}],"affected":[{"ecosystem":"npm","package":"dompurify","vulnerableRanges":[">=3.1.3, <3.3.2",">=2.5.3, <2.5.9"],"patched":["3.3.2","2.5.9"],"from":["GHSA-v2wj-7wpq-c8vv"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-9303","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2024-45801","published":"2024-09-16","fixed":"3.1.3","kev":false,"link":{"from":"CVE-2024-45801","to":"CVE-2026-0540","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:dompurify","fromFixed":"2.5.4","toFixed":"2.5.9","daysApart":533}]}},{"cve":"CVE-2024-47875","published":"2024-10-11","fixed":"3.1.3","kev":false},{"cve":"CVE-2025-26791","published":"2025-02-14","fixed":"3.2.4","kev":false},{"cve":"CVE-2025-15599","published":"2026-03-03","fixed":"3.2.7","kev":false},{"cve":"CVE-2026-0540","published":"2026-03-03","fixed":"3.3.2","kev":false},{"cve":"CVE-2026-65912","published":"2026-07-23","fixed":"3.3.2","kev":false},{"cve":"CVE-2026-65913","published":"2026-07-23","fixed":"3.3.2","kev":false},{"cve":"CVE-2026-65914","published":"2026-07-23","fixed":"3.3.2","kev":false}],"package":"npm:dompurify"}}