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 HatNVDcve.org
Base Score6.1N/A6.1
Attack VectorNetworkN/ANetwork
Attack ComplexityLowN/ALow
Privileges RequiredNoneN/ANone
User InteractionRequiredN/ARequired
ScopeChangedN/AChanged
ConfidentialityLowN/ALow
Integrity ImpactLowN/ALow
Availability ImpactNoneN/ANone

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

Want to get errata notifications? Sign up here.