{"id":"CVE-2026-0540","aliases":["GHSA-v2wj-7wpq-c8vv"],"url":"https://o3.security/vulnerability/CVE-2026-0540","summary":"DOMPurify XSS via Missing Rawtext Elements in SAFE_FOR_XML","details":"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.","published":"2026-03-03T17:26:06.621Z","modified":"2026-08-07T11:50:27.223356083Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"dompurify","fixedVersion":"3.3.2"},{"ecosystem":"npm","name":"dompurify","fixedVersion":"2.5.9"}],"fix":{"url":"https://github.com/cure53/DOMPurify/commit/302b51de22535cc90235472c52e3401bedd46f80","label":"cure53/DOMPurify@302b51d"},"references":[{"type":"ADVISORY","url":"https://fluidattacks.com/advisories/daft"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/0xxx/CVE-2026-0540.json"},{"type":"ADVISORY","url":"https://github.com/cure53/DOMPurify/releases/tag/3.3.2"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-0540"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/dompurify-xss-via-missing-rawtext-elements-in-safe-for-xml"},{"type":"FIX","url":"https://github.com/cure53/DOMPurify/commit/302b51de22535cc90235472c52e3401bedd46f80"},{"type":"PACKAGE","url":"https://github.com/cure53/DOMPurify"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-07T11:50:27.223356083Z"}}