Skip to main content

DOMPurify CVE-2026-65911

| EUVDEUVD-2026-48274 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. Access
    Submit malicious HTML with forbidden attribute or tag
  2. Delivery
    Target app passes content to shared DOMPurify instance
  3. Exploit
    Stale function predicate approves attacker-controlled attribute
  4. Execution
    Sanitized output retains dangerous handler
  5. Persist
    Victim renders page in browser
  6. Impact
    XSS payload executes in victim session

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 the target application to use DOMPurify in a specific multi-call pattern on a shared instance: (1) an initial sanitize() call must supply ADD_ATTR or ADD_TAGS as a JavaScript function predicate, establishing state in EXTRA_ELEMENT_HANDLING; (2) a subsequent sanitize() call on the same instance must supply ADD_ATTR or ADD_TAGS as an array rather than a function, failing to clear the previously registered handler. Single-call usage, per-call instantiation, or consistent use of only array-type options for ADD_ATTR and ADD_TAGS are all NOT vulnerable. Additionally, exploitation requires that a victim user interact with or render the unsanitized output in a browser context (UI:A per CVSS 4.0 vector). Deployments using DOMPurify without ADD_ATTR or ADD_TAGS options are not affected.

Impact

The vendor-provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:A/SC:L/SI:L) yields a score of 5.1 - moderate. The network attack vector and no-privileges-required metrics indicate that any network-reachable content submission path is potentially exploitable, but UI:A (active user interaction) and impact limited to the subsequent system (browser context) correctly constrain the score. The critical limiting factor is AC:L/AT:N in the official vector, which understates the practical deployment prerequisite: the target application must use the same DOMPurify instance across multiple sanitize() calls and must transition between function predicates and array values for ADD_ATTR or ADD_TAGS - a non-default and relatively uncommon usage pattern. EPSS data is not provided in the input; no KEV listing exists; no POC is confirmed. The vendor (Cure53) explicitly categorizes this as an edge case outside their threat model, suggesting real-world prevalence of the vulnerable call pattern is narrow. Despite DOMPurify's high deployment breadth, the specific two-call mixed-type pattern required to trigger state leakage significantly reduces the effective population of exploitable applications. This is best treated as a medium-priority upgrade rather than an emergency patch, unless an internal code audit confirms the vulnerable calling pattern is present.

Exploit ScenarioDerived

An attacker submits HTML containing a malicious event-handler attribute (e.g., onerror or onmouseover) or a tag explicitly included in FORBID_TAGS to an application that sanitizes user content with DOMPurify. Because an earlier sanitize() call on the same instance used a permissive function predicate via ADD_ATTR, the handler remains active in EXTRA_ELEMENT_HANDLING; the later call's array-based config does not clear it, so the attacker's attribute passes through unsanitized and executes as JavaScript when a victim renders the output in a browser. No public exploit code is confirmed at time of analysis.

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

DOMPurify through 3.3.3 leaks function predicate state across sanitize() calls on the same instance, enabling XSS bypass when applications invoke the library with mixed parameter types for ADD_ATTR or ADD_TAGS. Specifically, a function predicate supplied to one sanitize() call persists in the internal EXTRA_ELEMENT_HANDLING map and is not evicted when a subsequent call on the same instance supplies ADD_ATTR or ADD_TAGS as a plain array, allowing attacker-controlled event-handler attributes or vendor-forbidden tags to survive sanitization. No public exploit or CISA KEV listing is confirmed at time of analysis; the CVSS 4.0 score of 5.1 reflects user interaction required and impact scoped to the subsequent system (browser context), consistent with a reflected or stored XSS consequence.

RemediationAI

Upgrade DOMPurify to version 3.4.0 or later, which is confirmed as the patched release per the vendor advisory at https://github.com/cure53/DOMPurify/security/advisories/GHSA-9p3w-6h5p-cv75. For applications that cannot upgrade immediately, the most direct compensating control is to avoid reusing a single DOMPurify instance across calls with different ADD_ATTR or ADD_TAGS parameter types - instead, construct a new DOMPurify instance (or call DOMPurify.sanitize() with a fresh config object) for each distinct sanitization context. As an additional defense, audit all call sites to confirm whether function predicates are used; if so, restrict ADD_ATTR and ADD_TAGS to string arrays only until the upgrade is complete, eliminating the state-persistence code path entirely. Note that switching to per-call instantiation may carry a minor performance overhead in high-throughput sanitization loops.

Affected VersionsENISA

DOMPurify 0 <3.4.0

Affected Packages

euvd dompurify fix: 3.4.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

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

Technical ContextAI · show details

DOMPurify (CPE: cpe:2.3:a:cure53:dompurify:*:*:*:*:*:*:*:*), maintained by Cure53, is a widely-used client-side HTML sanitization library that strips dangerous markup before rendering. Callers can extend its allowlist by passing ADD_ATTR or ADD_TAGS options either as arrays of strings or as function predicates. The bug (CWE-79: Improper Neutralization of Input During Web Page Generation) is a state-management defect: when a function predicate is provided, it is stored in the EXTRA_ELEMENT_HANDLING internal map; on a subsequent sanitize() call with the same instance, if ADD_ATTR or ADD_TAGS is supplied as an array instead of a function, the library fails to clear or overwrite the previously registered function handler. The surviving function predicate continues to approve attributes or tags it was originally configured to allow, defeating any FORBID_TAGS constraints or tighter allowlist supplied by the second call. The root cause is missing invalidation logic for the EXTRA_ELEMENT_HANDLING structure between calls on shared DOMPurify instances.

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 4.7 MEDIUM

AC:H reflects the non-default two-call mixed-type usage pattern required; S:C and C:L/I:L capture XSS scope change into browser context.

3.1 AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:H/AT:P/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

In DOMPurify through 3.3.3, function predicates supplied via ADD_ATTR or ADD_TAGS to DOMPurify.sanitize() persist in internal state (EXTRA_ELEMENT_HANDLING) across subsequent sanitize() calls on the same instance. If a later call on the same instance provides ADD_ATTR or ADD_TAGS as an array rather than a function, the previously set function handler is neither cleared nor overwritten, so it continues to approve attacker-controlled attributes or tags. This can allow dangerous event-handler attributes or forbidden tags (bypassing FORBID_TAGS) to survive sanitization, resulting in cross-site scripting. The vendor (Cure53) considers this an edge case outside DOMPurify's threat model; the referenced advisory lists 3.4.0 as the patched version.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
High
dominant HTML sanitization library across web frameworks and CDN-delivered apps
Data Quality
5 sources
Confidence: Medium
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 No
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
None
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
High
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
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-65900 MEDIUM POC
5.1 Jul 23

SAFE_FOR_TEMPLATES bypass in DOMPurify 3.0.0-3.4.7 allows template expressions such as ${evil}, {{evil}}, and <%evil%> t

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

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