Skip to main content

DOMPurify EUVDEUVD-2026-110511

| CVE-2026-116803 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-10-26 VulnCheck GHSA-77h4-4vqj-j7vc
5.1
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Supply HTML with armed <img onerror> payload
  2. Delivery
    App calls sanitize() IN_PLACE with node-removing hook
  3. Exploit
    Hook detaches parent/sibling subtree left un-neutralized
  4. Execution
    Detached handler survives after sanitize() returns
  5. Impact
    onerror executes attacker script (DOM XSS)

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 a specific, non-default application configuration: the app must call DOMPurify.sanitize() with IN_PLACE:true AND register a hook (any of beforeSanitizeElements, uponSanitizeElement, afterSanitizeElements, beforeSanitizeAttributes, or afterSanitizeAttributes) that removes a node other than the hook's own node - i.e. the current node's parent/ancestor or a not-yet-visited sibling (the 'drop the whole <figure> if its image is disallowed' pattern). The attacker-supplied markup must contain a deferred handler such as <img onerror> that is already loading so it fires after sanitize() returns. LIMITING FACTORS: default usage, non-IN_PLACE mode, and hooks that only remove their own node are NOT affected (the walker still strips those); impact is confined to the victim browser DOM (no server compromise); and the flaw depends on the application's own hook logic plus the resource load/error event firing, per the advisory's 'input plus an application choice' classification.

Impact

Signals point to a genuine but conditional, medium-severity issue rather than a widespread emergency. The vendor CVSS 4.0 score is 5.1 (medium) with AV:N/AC:L/PR:N but UI:A and only low subsequent-system confidentiality/integrity impact (SC:L/SI:L, VA/SA:N), consistent with DOM XSS that executes in the victim's browser without server-side compromise. EPSS is low at 0.16% (6th percentile) and the CVE is NOT in CISA KEV, so there is no indication of active or mass exploitation. A detailed, working proof-of-concept is published in the cure53 GHSA advisory (demonstrated under jsdom and in Chromium/Playwright), so exploit knowledge is fully public even though exploitation is not confirmed in the wild. The decisive risk limiter is the precondition: the flaw only triggers when an application uses IN_PLACE mode together with a hook that removes a node other than its own (a parent, ancestor, or not-yet-visited sibling); default DOMPurify usage is unaffected. Net: this is a real, patch-worthy flaw aligned with the vendor's 'this_month' priority (not act_now/emergency), elevated by DOMPurify's enormous deployment base but sharply narrowed by the non-default hook pattern required. SSVC-style technical impact is partial (browser-context script execution, not host takeover); automatability is effectively limited because it depends on a specific application coding choice, not a default code path.

Exploit ScenarioDerived

An application sanitizes attacker-influenced HTML with DOMPurify.sanitize(content, {IN_PLACE: true}) and registers a hook (e.g. afterSanitizeAttributes) that drops a surrounding element - for example 'remove the whole <figure> if its image is disallowed.' The attacker submits markup such as <figure><img class=bad><img src=x onerror=alert(1)></figure>; when the hook removes the parent, the second image's onerror handler is never walked or neutralized and fires in the victim's browser after sanitize() returns, yielding DOM XSS. A full working PoC for this exact scenario is public in the GHSA advisory.

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 – Oct 28, 2026

DOM-based XSS in DOMPurify (all versions before 3.4.17) survives sanitization when an application runs IN_PLACE mode with a hook that removes a parent, ancestor, or not-yet-visited sibling: the detached subtree is never walked or neutralized, so an already-loading <img onerror> fires after sanitize() returns. Exploitation is conditional on that specific non-default configuration - remote, unauthenticated, but requiring user interaction and attacker markup containing a deferred handler - and the vendor has released 3.4.17 with a fix (PR 1672 / commit a77a3e7). Risk signals are modest and this is not an emergency: EPSS is 0.16% (6th percentile), there is no CISA KEV entry, and priority is 'this_month'; the vendor advisory itself includes a public proof-of-concept that demonstrates the handler firing in Chromium.

RemediationAI

Upgrade to DOMPurify 3.4.17, which is the fixed version listed for this advisory (vulnerable: <= 3.4.16); the code change is in PR https://github.com/cure53/DOMPurify/pull/1672 and commit https://github.com/cure53/DOMPurify/commit/a77a3e78b59f72fa4d1c83f22e121ad9cc7d3575, and full details are at https://github.com/cure53/DOMPurify/security/advisories/GHSA-mrv2-3pqr-j5jr. If the upgrade must be staged, the practical compensating controls follow the advisory's own analysis: stop using IN_PLACE:true and switch to the default string-returning mode (this changes the API contract - the sanitized output must be assigned back into the DOM rather than mutating the live tree in place), and audit every registered hook so it only removes the node it was invoked with, never an ancestor or an unvisited sibling, since only self-removal remains safely handled by the walker. Applications that genuinely need ancestor/sibling removal under IN_PLACE should post-process the returned tree themselves - recording the next node and the current node's ancestors before each hook call and neutralizing anything no longer attached under root, or collecting the original elements up front and neutralizing those no longer connected after the walk - which carries the trade-off of added application-side traversal cost and its own potential for gaps. Because exploitation needs attacker markup with a deferred handler such as <img onerror> that is already loading, tightening Content-Security-Policy to block inline handlers and restricting image sources reduces the chance a surviving handler executes, but does not repair the sanitizer's guarantee. No vendor-released patch is needed beyond 3.4.17; EPSS is low and there is no KEV entry, so scheduling this within the current monthly patch cycle matches the 'this_month' priority.

Affected VersionsENISA

DOMPurify 0 <3.4.17

Affected Packages

npm dompurify fix: 3.4.17

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 is a widely used client-side HTML/SVG sanitizer built on the DOM; in IN_PLACE mode it mutates the caller's live tree rather than returning a sanitized string, walking nodes with a TreeWalker and applying five user hook points (beforeSanitizeElements, uponSanitizeElement, afterSanitizeElements, beforeSanitizeAttributes, afterSanitizeAttributes). The root cause is CWE-79 (improper neutralization of input during web page generation), with the advisory also tagging CWE-693 (protection mechanism failure): the guard introduced for GHSA-p98j-92pf-mc4p in 3.4.16 lives in _handleHookDetachedNode() (src/purify.ts line 2134, dist/purify.cjs.js line 2009 in 3.4.16) and only checks whether the hook's own currentNode lost its parent (currentNode = root || getParentNode(currentNode) ! null). If the hook instead removes currentNode.parentNode, any ancestor, or a later sibling that the walker has not yet reached, currentNode still reports a parent, so _neutralizeSubtree() is never invoked; the removed subtree is also outside the walker's reach and absent from DOMPurify.removed, so the post-walk pass does not see it either - event handler attributes stay armed on elements whose resource load is already in flight. This is the same failure pattern as GHSA-55q2-fjhq-7xh7 and GHSA-p98j-92pf-mc4p and is an incomplete fix of the latter. Default (non-IN_PLACE) usage and hooks that remove only the node they were called for are not affected, because the walker still visits and strips those nodes; the flaw requires untrusted input plus an application choice of hook logic, and impact is confined to the victim's browser DOM with no server-side component. The exact sanitizer internals are documented in the advisory; the trigger requires the attacker markup to contain an element such as <img onerror> that is already loading at the time of the walk.

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 attacker markup needs no auth (PR:N); the handler executes in the victim browser context (S:C, C:L/I:L, A:N) and depends on the resource load/error firing (UI:R), with the IN_PLACE+removing-hook precondition noted separately rather than scored as attacker complexity.

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
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
Oct 27, 2026 - 01:15 EUVD
CVE Published
Oct 26, 2026 - 23:05 cve.org
MEDIUM 5.1

DescriptionCVE.org

DOMPurify before 3.4.17 contains a cross-site scripting vulnerability that allows attackers to keep event handlers armed when an IN_PLACE hook removes a parent or sibling node. Attacker markup in detached subtrees is never walked or neutralized, so handlers like img onerror fire after sanitize() returns, causing DOM XSS.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 16,332 npm packages depend on dompurify (3,926 direct, 12,648 indirect)

Ecosystem-wide dependent count for version 3.4.17.

Threat Intelligence Overview

EPSS Score
0.2%
Top 94% exploitable
Prevalence
High
de facto standard client-side HTML sanitizer across web applications
Data Quality
6 sources
Confidence: High

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· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

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

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