Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAttacker submits content triggering hook execution
-
DeliveryHook writes to data.allowedTags or data.allowedAttributes
-
ExploitDEFAULT_ALLOWED_TAGS / DEFAULT_ALLOWED_ATTR permanently widened
-
InstallAttacker submits crafted payload using poisoned tag/attribute
-
C2Subsequent sanitize() with default config passes payload
-
ExecutePoisoned HTML rendered in victim browser
-
ImpactXSS executes in victim session
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V14 - Data Protection Trust boundary enforcement
|
| Exploitation Conditions | Exploitation requires two simultaneous conditions in the target application: (1) a uponSanitizeElement or uponSanitizeAttribute hook must be installed that writes to data.allowedTags[tagName] = true or data.allowedAttributes[attrName] = true - this is described in the advisory as a natural-looking pattern for 'allow X for this iteration' and is not unusual in applications that conditionally permit additional elements; and (2) the application must subsequently call sanitize() on attacker-influenced input using the default configuration, meaning without explicit cfg.ALLOWED_TAGS or cfg.ALLOWED_ATTR arrays overriding the defaults. Applications that never install hooks of this type are not exploitable. Applications that always pass explicit allow-lists to every sanitize() call are not exploitable even if they install mutating hooks. The CVSS 4.0 UI:P metric reflects that the hook mutation (the poisoning event) must occur before the attacker's payload is processed, introducing a timing dependency. The scope of the impact is bounded to the same DOMPurify instance; separate instances or fresh constructions are unaffected. |
| Impact | The CVSS 4.0 base score of 5.3 (Medium, vector AV:N/AC:L/AT:N/PR:N/UI:P) characterizes this as network-accessible with low attack complexity and no privilege requirements, but dependent on user interaction. The VC:L/VI:L/SC:L/SI:L impact metrics reflect limited but real confidentiality and integrity bypass on both the vulnerable and subsequent-system surfaces, consistent with XSS enablement rather than full remote code execution. No EPSS score was provided in the source data; exploitation probability cannot be independently quantified. The vulnerability is not in CISA KEV, and no confirmed POC exists at time of analysis. Real-world risk is substantially mediated by the attack precondition: the target application must have an installed hook that writes to data.allowedTags or data.allowedAttributes, a pattern that, while natural-looking, is not universal across all DOMPurify deployments. However, the insidious nature of the state corruption - which cannot be cleared by removeAllHooks(), clearConfig(), or passing a fresh cfg, and requires constructing an entirely new DOMPurify instance - means applications unaware of the issue cannot self-recover through conventional remediation patterns. Given DOMPurify's broad deployment in content-rendering pipelines, any application with the requisite hook pattern is silently at persistent XSS risk. |
| Exploit ScenarioDerived | An attacker targets a web application using DOMPurify with a uponSanitizeElement hook that writes |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 23, 2026
Hook mutation pollution in DOMPurify <= 3.4.5 allows persistent bypass of HTML sanitization defaults when application-installed hooks mutate data.allowedTags or data.allowedAttributes. Because these hook fields are direct references to the library's live DEFAULT_ALLOWED_TAGS and DEFAULT_ALLOWED_ATTR sets rather than copies, any write inside a uponSanitizeElement or uponSanitizeAttribute hook permanently widens the global allow-lists for the entire lifetime of the DOMPurify instance - meaning all subsequent sanitize() calls under default config will pass through attacker-controlled HTML using the poisoned tag or attribute name. No public exploit has been identified at time of analysis, and this vulnerability is not listed in CISA KEV; real-world risk is gated on the presence of the specific hook mutation pattern in the target application.
RemediationAI
Upgrade DOMPurify to version 3.4.7 or later, which contains the defensive clone fix from commit 7996f1dc78eb8b7922388aed75d94a9f8fad9a36 (https://github.com/cure53/DOMPurify/commit/7996f1dc78eb8b7922388aed75d94a9f8fad9a36). Install via npm with npm install dompurify@3.4.7. The vendor advisory is at https://github.com/cure53/DOMPurify/security/advisories/GHSA-76mc-f452-cxcm. If immediate upgrade is not feasible, two workarounds exist with trade-offs: (1) Refactor all uponSanitizeElement and uponSanitizeAttribute hooks to avoid writing to data.allowedTags or data.allowedAttributes entirely - instead, pass an explicit cfg.ALLOWED_TAGS or cfg.ALLOWED_ATTR array to every sanitize() call so the live DEFAULT sets are never used as the reference base; this requires audit of all hook implementations and callers. (2) Construct a fresh DOMPurify instance for each sanitization context that requires different allow-lists, discarding instances after hook-mutating operations - this trades object allocation cost for state isolation. Note that removeAllHooks(), clearConfig(), and passing a fresh cfg object do NOT remediate already-poisoned state; only a new instance does.
Affected VersionsENISA
Affected Packages
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, cure53/DOMPurify, CPE: cpe:2.3:a:cure53:dompurify:*:*:*:*:*:*:*:*) is the dominant client-side HTML sanitization library for JavaScript. The flaw resides in the hook execution paths at src/purify.ts lines 1206-1209 (uponSanitizeElement) and 1494-1500 (uponSanitizeAttribute), where ALLOWED_TAGS and ALLOWED_ATTR are passed to hook callbacks as direct object references rather than defensive copies. When sanitize() is called without explicit cfg.ALLOWED_TAGS or cfg.ALLOWED_ATTR, the live sets themselves are direct references to the module-level DEFAULT_ALLOWED_TAGS and DEFAULT_ALLOWED_ATTR constants, completing the reference chain from hook callback to global constant. CWE-501 (Trust Boundary Violation) applies because a hook-scoped mutation leaks across the trust boundary into the global default state; CWE-693 (Protection Mechanism Failure) applies because the core protection mechanism - the default allow-list - is silently widened for all callers without any indication. The advisory notes the maintainer had already implemented a defensive clone at purify.ts:696-700 for the cfg.ADD_TAGS code path, demonstrating awareness of this class of bug; the hook path was the gap. The fix in 3.4.7 (commit 7996f1dc) closes this gap by cloning the sets before passing them to hook callbacks.
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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
AC:H reflects the specific hook mutation precondition required; S:C because poisoning crosses trust boundary to affect all subsequent instance callers.
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
DOMPurify before 3.4.7 (affected versions <= 3.4.5) passes direct references to the module-level DEFAULT_ALLOWED_TAGS and DEFAULT_ALLOWED_ATTR sets to the uponSanitizeElement and uponSanitizeAttribute hooks via data.allowedTags / data.allowedAttributes when sanitize is called without an explicit cfg.ALLOWED_TAGS / cfg.ALLOWED_ATTR array. A hook that mutates these fields permanently widens the default allow-lists for the lifetime of the DOMPurify instance, so all subsequent default-config sanitize calls inherit the widened defaults and attacker payloads using the poisoned tag/attribute name survive sanitization. removeAllHooks(), clearConfig(), and passing a fresh cfg do not recover the state; only constructing a new DOMPurify instance does.
Blast Radius
ecosystem impact- 26 npm packages depend on dompurify (18 direct, 8 indirect)
Ecosystem-wide dependent count for version 3.4.7.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. Rated medium severity (CVSS 6
Cure53 DOMPurify before 2.0.17 allows mutation XSS. Rated medium severity (CVSS 6.1), this vulnerability is remotely exp
DOMPurify before 2.0.1 allows XSS because of innerHTML mutation XSS (mXSS) for an SVG element or a MATH element, as demo
DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. Rated critical severity (CVSS
Mutation-XSS in DOMPurify before 3.3.2 enables JavaScript execution in victim browsers when sanitized output is re-inser
Trusted Types policy state contamination in DOMPurify 3.0.0-3.4.8 allows a previously supplied TRUSTED_TYPES_POLICY to s
Prototype pollution in DOMPurify's USE_PROFILES mode enables DOM-based XSS by causing the sanitizer to accept event hand
URI validation bypass in DOMPurify 3.3.1 and earlier allows `javascript:` protocol payloads to survive HTML sanitization
SAFE_FOR_TEMPLATES bypass in DOMPurify 3.0.0-3.4.7 allows template expressions such as ${evil}, {{evil}}, and <%evil%> t
Cross-site scripting in DOMPurify 3.4.6 and earlier enables script execution when the library's IN_PLACE sanitization mo
Stored XSS is achievable in applications using DOMPurify's setConfig() API combined with an uponSanitizeAttribute hook t
DOMPurify before 3.2.4 has an incorrect template literal regular expression, sometimes leading to mutation cross-site sc
Same weakness CWE-501 – Trust Boundary Violation
View allSame technique Information Disclosure
View allVendor 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 |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| openSUSE Leap 16.0 | Affected |
| openSUSE Leap 16.0 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Affected |
| SUSE Linux Enterprise Module for SAP Applications 15 SP3 | Affected |
| SUSE Linux Enterprise Module for SAP Applications 15 SP4 | Affected |
| SUSE Linux Enterprise Module for SAP Applications 15 SP5 | Affected |
| SUSE Linux Enterprise Module for SAP Applications 15 SP6 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP3 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Affected |
EUVD-2026-48271
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB