CVE-2026-65900
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.
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.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
The following CVSS metrics and score provided are preliminary and subject to review.
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 6.1 | N/A | 6.1 |
| Attack Vector | Network | N/A | Network |
| Attack Complexity | Low | N/A | Low |
| Privileges Required | None | N/A | None |
| User Interaction | Required | N/A | Required |
| Scope | Changed | N/A | Changed |
| Confidentiality | Low | N/A | Low |
| Integrity Impact | Low | N/A | Low |
| Availability Impact | None | N/A | None |
Vector
Red Hat: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
cve.org: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Understanding the Weakness (CWE)
Confidentiality
Technical Impact: Read Application Data
Integrity
Technical Impact: Execute Unauthorized Code or Commands
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.