Vulnerability 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.
CVSS Score
MEDIUM
Affected Products
| Vendor | Product | Versions |
|---|---|---|
| Cure53 | Dompurify | >= 3.0.0, < 3.4.8 |
Related Weaknesses (CWE)
References
- https://github.com/cure53/DOMPurify/security/advisories/GHSA-gvmj-g25r-r7wrExploitThird Party Advisory
- https://www.vulncheck.com/advisories/dompurify-before-template-expression-injectThird Party Advisory
- https://github.com/cure53/DOMPurify/security/advisories/GHSA-gvmj-g25r-r7wrExploitThird Party Advisory
FAQ
What is CVE-2026-65900?
CVE-2026-65900 is a vulnerability with a CVSS score of 6.1 (MEDIUM). 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 ...
How severe is CVE-2026-65900?
CVE-2026-65900 has been rated MEDIUM with a CVSS base score of 6.1/10. Review the CVSS metrics above for detailed severity breakdown.
Is there a patch for CVE-2026-65900?
Check the references section above for vendor advisories and patch information. Affected products include: Cure53 Dompurify.