What’s Vulnerable › Vulnerabilities
CVE-2026-65900: DOMPurify before 3.4.8 Template Expression Injection via RETURN_DOM
- Severity: medium (CVSS 6.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.3% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2026-07-23 · updated 2026-10-24
- Weakness: CWE-79
Description
DOMPurify versions >=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}}, <%evil%>) inside <template> 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.
Affected products
- cure53 DOMPurify: from 3.0.0 before 3.4.8 — fixed in 3.4.8
How to fix
Upgrade to a fixed version: cure53 DOMPurify 3.4.8. Check the vendor advisory for mitigations.
References
- https://github.com/cure53/DOMPurify/security/advisories/GHSA-gvmj-g25r-r7wr
- https://www.vulncheck.com/advisories/dompurify-before-template-expression-injection-via-return-dom
- https://github.com/cure53/DOMPurify/security/advisories/GHSA-gvmj-g25r-r7wr
Get alerted when CVE-2026-65900 or the next vulnerability affects your stack