CVE-2026-65900
dompurify: DOMPurify: Template expression injection allows information disclosure
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · July 23, 2026
Updated · October 27, 2026
Description
A flaw was found in DOMPurify. When configured to sanitize HTML templates for direct Document Object Model (DOM) output, the software fails to properly remove malicious template expressions. This allows an attacker to inject specially crafted input that bypasses the sanitization process. Consequently, a downstream template engine may evaluate these attacker-supplied expressions, which can lead to information disclosure or other unintended actions.
Statement
When DOMPurify is configured with both SAFE_FOR_TEMPLATES: true and a DOM output mode (such as RETURN_DOM: true or IN_PLACE: true), template expressions within <template> element content are not properly sanitized. This could lead to information disclosure or Cross-Site Scripting if a downstream template engine processes the unsanitized output. The default string output path is not affected.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
To mitigate this vulnerability, avoid using DOMPurify with SAFE_FOR_TEMPLATES: true in conjunction with DOM output modes such as RETURN_DOM, RETURN_DOM_FRAGMENT, or IN_PLACE. If DOM output is necessary, consider using the default string output path for sanitization, which is not affected by this flaw. Ensure that any template engines processing content from DOMPurify are not configured to evaluate expressions within <template> elements if the input is untrusted.
CVSS / CWE
CVSS 3.1 · 6.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CWE-917 · Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')