CVE-2026-65900 DOMPurify before 3.4.8 Template Expression Injection via RETURN_DOM
Attacker can inject template expressions in DOMPurify when using specific DOM output modes, potentially leading to code execution via downstream template engines.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-65900?
CVE-2026-65900 is a medium-severity cross-site scripting vulnerability in cure53 DOMPurify, published on 23 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official 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.
Weakness: CWE-79
Which versions are affected by CVE-2026-65900?
2 open source packages ship an affected version, including dompurify. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
dompurify npm | From 3.0.0 | 3.4.8 |
dompurify npm | From 3.0.0 | 3.4.8 |
Products include Cure53 Dompurify.
How do I fix CVE-2026-65900?
Upgrade dompurify to 3.4.8 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2026-65900 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-65900 exists.
Other vulnerabilities in cure53 DOMPurify
- CVE-2024-47875 DOMPurify nesting-based mXSS
- CVE-2024-48910 DOMPurify vulnerable to tampering by prototype polution
- CVE-2026-47423 DOMPurify XSS via `selectedcontent` re-clone
- CVE-2024-45801 Tampering by prototype polution in DOMPurify
- CVE-2026-49978 DOMPurify IN_PLACE Sanitization Bypass via Attached Shadow Root Inside <template>.content
Sources
Also known as CLSA-2026-1792369062, CLSA-2026-1792473150, CLSA-2026-1792486389, CLSA-2026-1792761229, DEBIAN-CVE-2026-65900, ECHO-9b95-7df6-c271 and 20 more.