Skip to main content

DOMPurify EUVDEUVD-2026-48269

| CVE-2026-65900 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-07-23 VulnCheck
5.1
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Submit HTML with split template expression inside <template>
  2. Delivery
    KEEP_CONTENT moves child text nodes into template.content
  3. Exploit
    NodeIterator skips template.content during _scrubTemplateExpressions pass
  4. Install
    node.normalize() also skips template.content
  5. C2
    merged expression survives sanitization
  6. Execute
    application passes DOM output to downstream template engine
  7. Impact
    engine evaluates attacker-controlled expression

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires all three of the following conditions to be simultaneously true: (1) the application explicitly sets SAFE_FOR_TEMPLATES: true in its DOMPurify configuration; (2) the application uses one of the DOM output modes - RETURN_DOM: true, RETURN_DOM_FRAGMENT: true, or IN_PLACE: true - rather than the default string output; and (3) the resulting DOM output is subsequently consumed by a downstream template engine that processes expressions of the form ${...}, {{...}}, or <%...%>. The default DOMPurify string output path is explicitly confirmed unaffected. Applications using DOMPurify for standard XSS protection without these non-default flags are not vulnerable. The requirement for a specific non-default configuration combination, plus a downstream template engine in the data pipeline, substantially limits the realistic attack surface beyond what the raw CVSS vector suggests.

Impact

The CVSS 4.0 score of 5.1 (AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N) reflects a network-reachable attack requiring active user interaction, with impact limited to Low integrity on the subsequent system and no impact on the vulnerable component itself. This is not listed in CISA KEV and no public exploit code is cited in the available references, so exploitation probability cannot be confirmed from those signals; no EPSS score is present in the provided data. Real-world risk is substantially gated by deployment specifics: the vulnerable code path requires explicit use of both SAFE_FOR_TEMPLATES and a DOM output mode, both of which are non-default configurations. Applications using the default string output, or using SAFE_FOR_TEMPLATES without a DOM output mode, are confirmed unaffected. Despite the AC:L vector metric (which measures attacker-side conditions), the dependency on a specific server-side configuration choice narrows the realistic population considerably. The combination of a non-KEV status, no observed POC, medium CVSS 4.0 score, and non-default trigger conditions makes this a targeted remediation priority for affected deployments rather than an emergency response for the broader DOMPurify install base.

Exploit ScenarioDerived

An attacker submits crafted HTML containing a <template> element whose content, after DOMPurify's KEEP_CONTENT processing removes a disallowed child element, leaves adjacent text nodes that merge to form ${attacker_code}. The application collects the DOM output via RETURN_DOM and passes the resulting tree to a downstream template engine such as Angular, Handlebars, or a server-side renderer, which evaluates the surviving expression and executes attacker-controlled code in the victim's browser or server context. No public exploit code has been identified, but the GHSA advisory provides sufficient source-level detail (file paths and line numbers) for a capable attacker to construct a proof of concept.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 23, 2026

SAFE_FOR_TEMPLATES bypass in DOMPurify 3.0.0-3.4.7 allows template expressions such as ${evil}, {{evil}}, and <%evil%> to survive sanitization when DOM output modes (RETURN_DOM, RETURN_DOM_FRAGMENT, or IN_PLACE) are used alongside SAFE_FOR_TEMPLATES: true. The final normalization pass (_scrubTemplateExpressions) employs a NodeIterator that, per DOM specification, does not descend into <template>.content - a separate DocumentFragment outside the normal child-node tree - meaning split text nodes that merge into exploitable expressions inside template content are never caught. Downstream template engines receiving this output may evaluate attacker-supplied expressions, producing XSS or template injection outcomes; no public exploit is identified at time of analysis, and the string output path is explicitly confirmed unaffected.

RemediationAI

Vendor-released patch: 3.4.8. Upgrade DOMPurify to version 3.4.8 or later via npm (npm install dompurify@3.4.8 or equivalent package manager command); the fix is documented in the GHSA advisory at https://github.com/cure53/DOMPurify/security/advisories/GHSA-gvmj-g25r-r7wr. If an immediate upgrade is not feasible, the most effective targeted workaround is to switch from DOM output modes to the default string output path by removing RETURN_DOM, RETURN_DOM_FRAGMENT, or IN_PLACE from the DOMPurify configuration, as the string path is explicitly confirmed unaffected - this trade-off is that callers receiving a string rather than a DOM node must adjust downstream handling. A second workaround is to disable the SAFE_FOR_TEMPLATES flag and instead perform post-sanitization template expression stripping using a separate, purpose-built step before handing output to the template engine; however, this approach is error-prone and should not be treated as a permanent solution. Applications that do not combine both SAFE_FOR_TEMPLATES and a DOM output mode require no action.

Affected VersionsENISA

DOMPurify 3.0.0 <3.4.8

Affected Packages

npm dompurify fix: 3.4.8

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

DOMPurify (npm: dompurify, CPE: cpe:2.3:a:cure53:dompurify:*:*:*:*:*:*:*:*) is the de facto HTML sanitization library for JavaScript front-ends. The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation). SAFE_FOR_TEMPLATES operates through two mechanisms: per-node scrubbing in _sanitizeElements (purify.ts:1403) and a final normalization pass in _scrubTemplateExpressions (purify.ts:1115-1117). The normalization pass calls node.normalize() to merge adjacent text nodes and then walks them to strip expressions that only appear post-merge. However, both the NodeIterator used for this walk and node.normalize() are specified by the DOM standard to not traverse or normalize nodes inside <template>.content, which is a detached DocumentFragment. When DOMPurify removes a disallowed element with KEEP_CONTENT: true (the default), it moves the element's text children into the parent (purify.ts:1361-1373), potentially creating adjacent text nodes inside <template>.content that together form a template expression. Since the normalization pass never reaches template.content, these merged expressions escape sanitization intact and are forwarded to downstream template engines.

Know when Dompurify gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 5.1 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
vuln.today AI 6.1 MEDIUM

Network-delivered XSS requiring victim interaction; scope changes because the downstream template engine context is affected beyond DOMPurify itself; no direct C/I/A impact on the vulnerable component.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
SUSE 6.1 HIGH
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Red Hat 6.1 MEDIUM

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Jul 23, 2026 - 15:18 EUVD
CVE Published
Jul 23, 2026 - 13:16 cve.org
MEDIUM 5.1

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.2%
Top 94% exploitable
Prevalence
High
de facto HTML sanitization library for JavaScript front-ends
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

CVE-2024-47875 MEDIUM POC
6.1 Oct 11

DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. Rated medium severity (CVSS 6

CVE-2020-26870 MEDIUM POC
6.1 Oct 07

Cure53 DOMPurify before 2.0.17 allows mutation XSS. Rated medium severity (CVSS 6.1), this vulnerability is remotely exp

CVE-2019-16728 MEDIUM POC
6.1 Sep 24

DOMPurify before 2.0.1 allows XSS because of innerHTML mutation XSS (mXSS) for an SVG element or a MATH element, as demo

CVE-2024-48910 CRITICAL
9.8 Oct 31

DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. Rated critical severity (CVSS

CVE-2026-65914 MEDIUM POC
5.3 Jul 23

Mutation-XSS in DOMPurify before 3.3.2 enables JavaScript execution in victim browsers when sanitized output is re-inser

CVE-2026-65902 MEDIUM POC
5.3 Jul 23

Hook mutation pollution in DOMPurify <= 3.4.5 allows persistent bypass of HTML sanitization defaults when application-in

CVE-2026-65899 MEDIUM POC
5.1 Jul 23

Trusted Types policy state contamination in DOMPurify 3.0.0-3.4.8 allows a previously supplied TRUSTED_TYPES_POLICY to s

CVE-2026-65913 MEDIUM POC
5.1 Jul 23

Prototype pollution in DOMPurify's USE_PROFILES mode enables DOM-based XSS by causing the sanitizer to accept event hand

CVE-2026-65912 MEDIUM POC
5.1 Jul 23

URI validation bypass in DOMPurify 3.3.1 and earlier allows `javascript:` protocol payloads to survive HTML sanitization

CVE-2026-65901 MEDIUM POC
5.1 Jul 23

Cross-site scripting in DOMPurify 3.4.6 and earlier enables script execution when the library's IN_PLACE sanitization mo

CVE-2026-65898 MEDIUM POC
5.1 Jul 23

Stored XSS is achievable in applications using DOMPurify's setConfig() API combined with an uponSanitizeAttribute hook t

CVE-2025-26791 MEDIUM POC
4.5 Feb 14

DOMPurify before 3.2.4 has an incorrect template literal regular expression, sometimes leading to mutation cross-site sc

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Module for SAP Applications 15 SP7 Affected
SUSE Linux Enterprise Server 16.0 Affected
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP Applications 15 SP7 Affected
SUSE Linux Enterprise Server for SAP applications 16.0 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy