{"id":"CVE-2026-65900","summary":"DOMPurify before 3.4.8 Template Expression Injection via RETURN_DOM","details":"DOMPurify versions \u003e=3.0.0 and before 3.4.8, when configured with SAFE_FOR_TEMPLATES together with a DOM output mode (RETURN_DOM, RETURN_DOM_FRAGMENT, or IN_PLACE), fail to strip template expressions (e.g. ${evil}, {{evil}}, \u003c%evil%\u003e) inside \u003ctemplate\u003e element content. The final normalization/scrub pass (_scrubTemplateExpressions) uses a NodeIterator and node.normalize() that do not descend into template.content, so expressions that only form after adjacent text nodes merge survive sanitization. This bypasses SAFE_FOR_TEMPLATES and can allow a downstream template engine to evaluate attacker-supplied expressions. The string output path is not affected.","aliases":["GHSA-gvmj-g25r-r7wr"],"modified":"2026-07-25T04:14:50.557992871Z","published":"2026-07-23T13:16:19.045Z","related":["CGA-q65m-x2fc-c4pf"],"database_specific":{"cna_assigner":"VulnCheck","cwe_ids":["CWE-79"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/65xxx/CVE-2026-65900.json"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/65xxx/CVE-2026-65900.json"},{"type":"ADVISORY","url":"https://github.com/cure53/DOMPurify/security/advisories/GHSA-gvmj-g25r-r7wr"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-65900"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/dompurify-before-template-expression-injection-via-return-dom"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/cure53/dompurify","events":[{"introduced":"5dcf2a012c70ea8b65c0ecff7de86a61d7d98181"},{"fixed":"bcdd8285412dc9c4c149652aed2d712e790d6ccf"}],"database_specific":{"source":["AFFECTED_FIELD","DESCRIPTION"],"extracted_events":[{"introduced":"3.0.0"},{"fixed":"3.4.8"},{"introduced":"0"}]}}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-65900.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","score":"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"}]}