{"id":"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 \u003c/noscript\u003e\u003cimg src=x onerror=alert(1)\u003e in attribute values to execute JavaScript when sanitized output is placed inside these unprotected rawtext contexts.","aliases":["GHSA-v2wj-7wpq-c8vv"],"modified":"2026-06-18T03:57:22.623763056Z","published":"2026-03-03T17:26:06.621Z","related":["CGA-wcqm-jq92-cx5v","openSUSE-SU-2026:10599-1"],"database_specific":{"cna_assigner":"VulnCheck","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/0xxx/CVE-2026-0540.json","cwe_ids":["CWE-79"]},"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"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/cure53/dompurify","events":[{"introduced":"e1ddfc7b5e6d6599c369f826699b0204e2c691b9"},{"introduced":"3fe78d7501103832166613bb1452985dd4674008"},{"fixed":"302b51de22535cc90235472c52e3401bedd46f80"}],"database_specific":{"extracted_events":[{"introduced":"2.5.3"},{"last_affected":"2.5.8"},{"introduced":"3.1.3"},{"last_affected":"3.3.1"}],"cpe":"cpe:2.3:a:cure53:dompurify:*:*:*:*:*:*:*:*","source":["CPE_RANGE","REFERENCES"]}}],"versions":["3.2.3","3.1.3"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-0540.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"}]}