CVE-2026-65900: DOMPurify before 3.4.8 Template Expression Injection via RETURN_DOM

Published Jul 23, 2026
·
Updated

DOMPurify versions >=3.0.0 and before 3.4.8, when configured with SAFEFORTEMPLATES together with a DOM output mode (RETURNDOM, RETURNDOMFRAGMENT, or INPLACE), 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 SAFEFORTEMPLATES and can allow a downstream template engine to evaluate attacker-supplied expressions. The string output path is not affected.

Affected Software

1 affected component
DOMPurify DOMPurify>=3.0.0<3.4.8

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade DOMPurify to a version that resolves this vulnerability.

    Fixed in 3.4.8
  2. Configuration

    Avoid using DOMPurify versions >=3.0.0 and before 3.4.8 with SAFE_FOR_TEMPLATES together with DOM output modes RETURN_DOM, RETURN_DOM_FRAGMENT, or IN_PLACE, because template expressions inside <template> element content can survive sanitization via Template Expression Injection via RETURN_DOM.

    DOMPurify SAFE_FOR_TEMPLATES + output mode (RETURN_DOM / RETURN_DOM_FRAGMENT / IN_PLACE) = disable combination (use a DOM output mode without SAFE_FOR_TEMPLATES, or keep SAFE_FOR_TEMPLATES without DOM output modes)

Event History

Jul 23, 2026
CVE Published
via MITRE·01:16 PM
Data Sourced
via MITRE·01:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:18 PM
DescriptionSeverityWeakness
Jan 15, 58532
Event
via NVD·11:03 AM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-65900?

CVE-2026-65900 has a medium severity rating of 6.1.

2

How do I fix CVE-2026-65900?

To address CVE-2026-65900, upgrade DOMPurify to version 3.4.8 or later.

3

What types of vulnerabilities does CVE-2026-65900 affect?

CVE-2026-65900 specifically affects applications using DOMPurify for sanitizing template expressions.

4

What impact does CVE-2026-65900 have on web applications?

CVE-2026-65900 can lead to template expression injection, potentially allowing Cross-Site Scripting (XSS) attacks.

5

In which versions is CVE-2026-65900 present?

CVE-2026-65900 is present in DOMPurify versions 3.0.0 to 3.4.7.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203