Skip to main content

DOMPurify EUVDEUVD-2026-48286

| CVE-2026-65898 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
    Obtain low-privilege account on target application
  2. Delivery
    Submit trusted content triggering uponSanitizeAttribute hook to write dangerous attr to shared ALLOWED_ATTR
  3. Exploit
    Shared allowlist permanently polluted across DOMPurify instance
  4. Install
    Submit attacker-controlled untrusted content with event-handler attribute
  5. C2
    Attribute survives sanitization and stored in database
  6. Execute
    Victim loads page containing poisoned content
  7. Impact
    Stored XSS executes arbitrary JavaScript in victim browser

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 that the target application satisfies both of the following conditions simultaneously: (1) it calls DOMPurify.setConfig() at least once to establish a persistent sanitization policy (this sets the internal SET_CONFIG=true flag, which causes all subsequent sanitize() calls to skip _parseConfig()); and (2) it registers an uponSanitizeAttribute hook via DOMPurify.addHook('uponSanitizeAttribute', ...) that writes data.allowedAttributes[name]=true to conditionally allow a dangerous attribute such as onerror, onclick, onmouseover, onload, srcdoc, or formaction for specific trusted elements. Additionally, an attacker must be able to submit content that is processed by the same DOMPurify instance after a trusted render has already triggered the hook's allowlist mutation. Applications using DOMPurify without setConfig() retain the _parseConfig() clone-guard from 3.4.7 and are NOT affected. Applications using setConfig() but with no uponSanitizeAttribute hook, or with hooks that do not write to data.allowedAttributes, are also NOT affected. The CVSS PR:L confirms that some level of authenticated or application-level access to submit content is required.

Impact

The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:P, score 5.1) accurately characterizes the real-world conditions: exploitation is not zero-effort but the complexity is low once the preconditions are met. PR:L indicates an attacker must be able to submit content that is processed through the hook-enabled sanitizer path (e.g., a registered user in a content platform). UI:P captures that stored XSS requires a victim to load the page containing the poisoned content. The subsequent-system impact (SC:L/SI:L) reflects limited but meaningful cross-origin script execution capability - sufficient for session hijacking, credential phishing, or defacement. The vulnerability is most dangerous in multi-tenant applications where user-submitted content and privileged content share the same DOMPurify instance. No KEV listing and no public exploit code have been identified, which tempers urgency, but the bypass mechanism is mechanically straightforward for anyone familiar with DOMPurify internals. The exploit pattern - trigger hook pollution via trusted content, then submit malicious content - is a known stored XSS archetype with no mitigating complexity once the configuration precondition is met. The fact that this is an incomplete fix of a known prior patch (3.4.7) means the attack surface is already documented, slightly elevating exploitation likelihood relative to a novel finding.

Exploit ScenarioDerived

An attacker with a low-privilege account on a content platform (e.g., blog commenter, document editor) first submits a legitimate post containing a trusted element (such as one bearing a data-trusted marker) that triggers the application's uponSanitizeAttribute hook to write data.allowedAttributes['onerror']=true, permanently polluting the shared ALLOWED_ATTR. The attacker then submits a second post containing an img tag with an onerror attribute and arbitrary JavaScript payload; because the allowlist is now polluted, DOMPurify passes the attribute through and the content is stored in the database. When any subsequent victim loads a page rendering either post, the onerror handler executes in their browser, enabling the attacker to steal session cookies or perform actions on their behalf. No public exploit code has been identified, but the bypass is reproducible from the published advisory description alone.

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

Stored XSS is achievable in applications using DOMPurify's setConfig() API combined with an uponSanitizeAttribute hook that conditionally permits dangerous attributes for trusted elements. The 3.4.7 patch introduced a clone-guard to prevent hook-driven allowlist mutation, but that guard lives exclusively inside _parseConfig(); setConfig() sets an internal SET_CONFIG flag that causes sanitize() to skip _parseConfig() entirely, handing hooks the live shared ALLOWED_ATTR object. One trusted render permanently poisons the allowlist for the entire DOMPurify instance lifetime, so subsequent attacker-controlled content inherits the mutated policy and retains event-handler attributes like onerror or onclick unstripped. No public exploit or CISA KEV listing has been identified at time of analysis; the CVSS 4.0 score of 5.1 reflects that exploitation requires prior privilege to trigger hook pollution and passive victim interaction to realize the XSS.

RemediationAI

Upgrade DOMPurify to version 3.4.11, which is the vendor-released patch confirmed by the GitHub Security Advisory GHSA-cmwh-pvxp-8882. Version 3.4.11 extends the clone-guard beyond _parseConfig() to also cover the setConfig() code path, ensuring hooks always receive an isolated copy of ALLOWED_ATTR. Until the upgrade can be applied, a targeted compensating control is to audit all uponSanitizeAttribute hooks and remove or gate any data.allowedAttributes[name]=true assignments for event-handler attributes (onerror, onclick, onmouseover, onload, srcdoc, formaction, etc.) - hooks that do not write to data.allowedAttributes are not vulnerable. A second workaround is to replace setConfig() usage with per-call config objects passed directly as the second argument to sanitize(), which restores the _parseConfig() code path and the existing clone-guard without requiring a library upgrade; the trade-off is slightly higher per-call overhead and a refactor of call sites. Do not rely on application-layer attribute filtering downstream of DOMPurify as a substitute, as the polluted output is already rendered HTML at that point.

Affected VersionsENISA

DOMPurify 0 <3.4.11

Affected Packages

npm dompurify fix: 3.4.11

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 a client-side JavaScript HTML sanitization library by cure53 that enforces allowlists for tags and attributes. Its ALLOWED_ATTR constant governs which attributes survive sanitization; DOMPurify carries no separate blocklist for /^on/ event handlers - the allowlist is the sole gate. The 3.4.7 release patched a prior hook-pollution bug by cloning ALLOWED_ATTR inside _parseConfig() when an uponSanitizeAttribute hook is registered. CVE-2026-65898 is an incomplete fix: the clone-guard is bypassed because setConfig() sets the module-scoped SET_CONFIG=true flag, and sanitize() checks that flag to skip _parseConfig() for performance - meaning the clone never happens. The hook then receives a direct reference to the shared ALLOWED_ATTR object, and any data.allowedAttributes[name]=true write is permanent for the instance lifetime across all subsequent sanitize() calls and all element types. CWE-79 (Stored/DOM XSS) is the outcome; the root cause class is mutable shared state exposed without isolation, an incomplete remediation pattern.

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:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
vuln.today AI 5.4 MEDIUM

PR:L because triggering allowlist pollution requires submitting trusted content as a low-privileged user; UI:R for stored XSS victim page load; S:C for cross-origin script execution; no availability impact.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Passive
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 before 3.4.11 fails to clone the ALLOWED_ATTR allowlist when setConfig() is used with an uponSanitizeAttribute hook, allowing the hook to permanently mutate the shared allowlist. Attackers can register a hook that conditionally allows dangerous attributes like onerror for trusted elements, then submit untrusted content that inherits the polluted allowlist and executes event handlers as stored XSS.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 354 npm packages depend on dompurify (48 direct, 306 indirect)

Ecosystem-wide dependent count for version 3.4.11.

Threat Intelligence Overview

EPSS Score
0.2%
Top 95% exploitable
Prevalence
High
widely used HTML sanitization library across JavaScript web applications
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
None
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-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-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