{"id":"CVE-2026-41239","published":"2026-04-23T14:47:56Z","modified":"2026-04-25T01:21:43Z","title":"DOMPurify has a SAFE_FOR_TEMPLATES bypass in RETURN_DOM mode","vendor":"cure53","product":"DOMPurify","tier":"tail","description":{"text":"DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Starting in version 1.0.10 and prior to version 3.4.0, `SAFE_FOR_TEMPLATES` strips `{{...}}` expressions from untrusted HTML. This works in string mode but not with `RETURN_DOM` or `RETURN_DOM_FRAGMENT`, allowing XSS via template-evaluating frameworks like Vue 2. Version 3.4.0 patches the issue.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.8,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00258,"percentile":0.17805,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-1289","name":"Improper Validation of Unsafe Equivalence in Input"}],"references":[{"url":"https://github.com/cure53/DOMPurify/security/advisories/GHSA-crv5-9vww-q3g8","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/cure53/DOMPurify/releases/tag/3.4.0","tags":["x_refsource_MISC"]}],"priority":{"score":8.3,"factors":[{"name":"EPSS percentile","points":3.56},{"name":"CVSS severity","points":4.76}]},"vendorSlug":"cure53","affectedVersions":[{"vendor":"cure53","product":"DOMPurify","versions":[">= 1.0.10, < 3.4.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-04-25T01:21:32.614113Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"dompurify","vulnerableRanges":[">=1.0.10, <3.4.0"],"patched":["3.4.0"],"from":["GHSA-crv5-9vww-q3g8"],"provenance":"source"}],"summary":{"text":"The flaw is a SAFE_FOR_TEMPLATES bypass in the DOMPurify HTML sanitizer, where stripping of {{...}} template expressions is skipped when output is returned as a DOM node (RETURN_DOM or RETURN_DOM_FRAGMENT) rather than a string. An attacker who can supply untrusted HTML to an affected DOMPurify build can get cross-site scripting through template-evaluating frameworks such as Vue 2, and exploitation requires user interaction (UI:R), with the attack complexity rated high.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:11:32Z"},"euvd":{"id":"EUVD-2026-25237","exploited":false,"provenance":"source"}}