{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-0540","id":"CVE-2026-0540","title":"DOMPurify XSS via Missing Rawtext Elements in SAFE_FOR_XML","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","descriptionLong":"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","updated":"2026-10-28T02:30:25.500568705Z","reserved":"2025-12-27T01:44:44.145Z","status":"Modified","rejected":false,"assigner":"VulnCheck","metric":{"version":"4.0","score":5.3,"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","rating":"medium","source":"VulnCheck"},"metrics":[{"version":"4.0","score":5.3,"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","rating":"medium","source":"VulnCheck"},{"version":"4.0","score":5.3,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","rating":"medium","source":"fluidattacks.com"},{"version":"4.0","score":null,"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","rating":"unrated","source":"OSV"},{"version":"4.0","score":null,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","rating":"medium","source":"GitHub"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"VulnCheck"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"fluidattacks.com"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub"}],"rating":"medium","products":["cure53 DOMPurify"],"affectedProducts":[{"vendor":"cure53","product":"DOMPurify","defaultStatus":"unaffected","versions":[{"status":"affected","version":"3.1.3","lessThanOrEqual":"3.3.1","versionType":"semver"},{"status":"affected","version":"2.5.3","lessThanOrEqual":"2.5.8","versionType":"semver"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"dompurify","purl":"pkg:npm/dompurify","ranges":[">=3.1.3 <3.3.2",">=2.5.3 <2.5.9"],"fixed":["3.3.2","2.5.9"],"advisory":"GHSA-v2wj-7wpq-c8vv"}],"cwes":["CWE-79"],"aliases":["GHSA-v2wj-7wpq-c8vv"],"references":[{"url":"https://github.com/cure53/DOMPurify","tags":["product","Product","package"]},{"url":"https://github.com/cure53/DOMPurify/commit/302b51de22535cc90235472c52e3401bedd46f80","tags":["patch","fix","web"]},{"url":"https://github.com/cure53/DOMPurify/releases/tag/3.3.2","tags":["release-notes","advisory","web"]},{"url":"https://fluidattacks.com/advisories/daft","tags":["third-party-advisory","advisory","web"]},{"url":"https://www.vulncheck.com/advisories/dompurify-xss-via-missing-rawtext-elements-in-safe-for-xml","tags":["third-party-advisory","Third Party Advisory","advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/0xxx/CVE-2026-0540.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-0540","tags":["advisory"]},{"url":"https://github.com/cure53/DOMPurify/commit/fca0a938b4261ddc9c0293a289935a9029c049f5","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00388,"epssPercentile":0.33514,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-0540","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-0540","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-0540","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-v2wj-7wpq-c8vv","ok":true,"note":"GHSA-v2wj-7wpq-c8vv"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-0540","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}