CVE-2026-65900
MEDIUMDOMPurify before 3.4.8 Template Expression Injection via RETURN_DOM
Title source: cnaDescription
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.
References (2)
Core 2
Core References
Vendor Advisory vendor-advisory
GitHub Security Advisory (GHSA-gvmj-g25r-r7wr)
https://github.com/cure53/DOMPurify/security/advisories/GHSA-gvmj-g25r-r7wr
Third Party Advisory third-party-advisory
VulnCheck Advisory: DOMPurify before 3.4.8 Template Expression Injection via RETURN_DOM
https://www.vulncheck.com/advisories/dompurify-before-template-expression-injection-via-return-dom
Scores
CVSS v3
6.1
EPSS
0.0018
EPSS Percentile
7.9%
Attack Vector
NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CISA SSVC
Vulnrichment
Exploitation
poc
Automatable
no
Technical Impact
partial
Details
CWE
CWE-79
Status
published
Products (4)
cure53/DOMPurify
3.0.0 - 3.4.8
cure53/dompurify
3.0.0 - 3.4.8
cure53/DOMPurify
3.4.8
npm/dompurify
3.0.0 - 3.4.8npm
Published
Jul 23, 2026
Tracked Since
Jul 23, 2026