{"cve":"CVE-2026-0540","nvd":{"published":"2026-03-03T18:16:24.457","modified":"2026-06-17T10:10:54.790","status":"Modified","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.","cvss_v4":{"vector":"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","score":5.3},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1},"cwes":["CWE-79"],"references":["https://fluidattacks.com/advisories/daft","https://github.com/cure53/DOMPurify","https://github.com/cure53/DOMPurify/commit/302b51de22535cc90235472c52e3401bedd46f80","https://github.com/cure53/DOMPurify/releases/tag/3.3.2","https://www.vulncheck.com/advisories/dompurify-xss-via-missing-rawtext-elements-in-safe-for-xml"],"products":["cure53:dompurify"],"source":"nvd","synced_at":"2026-10-19T22:24:17.937441719+00:00"},"epss":{"cve":"CVE-2026-0540","score":0.00388,"percentile":0.32906,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-v2wj-7wpq-c8vv","url":"https://osv.dev/vulnerability/GHSA-v2wj-7wpq-c8vv","summary":"DOMPurify contains a Cross-site Scripting vulnerability","modified":"2026-09-10T03:50:41.055616171Z","packages":[{"ecosystem":"npm","name":"dompurify","purl":"pkg:npm/dompurify","ranges":[">=3.1.3 <3.3.2"],"fixed":["3.3.2"]},{"ecosystem":"npm","name":"dompurify","purl":"pkg:npm/dompurify","ranges":[">=2.5.3 <2.5.9"],"fixed":["2.5.9"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}