Skip to main content

DOMPurify CVE-2026-65912

| EUVDEUVD-2026-48275 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
    Identify application using DOMPurify with permissive ADD_ATTR predicate
  2. Delivery
    Craft anchor tag with javascript: URI as href
  3. Exploit
    Submit payload via user-controlled HTML input
  4. Execution
    Payload survives sanitization as URI check is short-circuited
  5. Persist
    Victim activates rendered link
  6. Impact
    DOM-based XSS executes in victim browser context

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 have explicitly configured DOMPurify with a predicate function supplied as ADD_ATTR via EXTRA_ELEMENT_HANDLING.attributeCheck, and that predicate must return true for a URI-bearing attribute (such as href on <a> elements) in response to attacker-controlled input. Applications using DOMPurify without the EXTRA_ELEMENT_HANDLING.attributeCheck API - the vast majority of deployments - are not affected by this vulnerability. Additionally, exploitation requires user interaction: the CVSS 4.0 vector (UI:A) confirms the victim must actively click or activate the crafted link for the javascript: payload to execute. These two prerequisites - non-default API configuration and required user interaction - are the primary factors limiting real-world exploitation beyond the high theoretical reach of the library.

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) accurately captures the network-accessible delivery and user-interaction requirement (victim must click the link), with impact scoped to the subsequent system (victim browser context) rather than the vulnerable application's own data. The key real-world risk limiter is the non-default configuration: only applications that explicitly pass a permissive predicate function to EXTRA_ELEMENT_HANDLING.attributeCheck are exposed - standard DOMPurify usage without this API is unaffected. EPSS data was not provided in the available intelligence, so exploitation probability cannot be quantified from that signal. No CISA KEV listing exists, indicating no confirmed widespread active exploitation. However, a working PoC is documented in the official GHSA advisory, meaningfully lowering the exploitation bar for targeted scenarios. Given DOMPurify's enormous npm footprint, even a small percentage of misconfigured deployments represents a substantial absolute attack surface.

Exploit ScenarioDerived

An attacker targets a web application that renders user-supplied HTML through DOMPurify configured with a custom ADD_ATTR predicate that returns true for href on anchor elements. The attacker submits <a href="javascript:alert(document.domain)">click here</a>, which passes sanitization because _isValidAttribute exits before URI validation when the predicate approves the attribute. When a victim user clicks the rendered link, the javascript: payload executes in the victim's browser context; the GHSA-published PoC demonstrates this technique using an iframe click to simulate victim interaction.

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

URI validation bypass in DOMPurify 3.3.1 and earlier allows javascript: protocol payloads to survive HTML sanitization and execute as DOM-based XSS when a crafted link is activated. The flaw exists in the _isValidAttribute function, which short-circuits before URI-safe validation runs when a caller-supplied predicate via EXTRA_ELEMENT_HANDLING.attributeCheck returns true for a given attribute/tag pair. Exploitation is conditioned on the consuming application using the non-default ADD_ATTR predicate API, but a working proof-of-concept is confirmed in the official GHSA advisory; no CISA KEV listing is present at time of analysis.

RemediationAI

Vendor-released patch: DOMPurify 3.3.2 resolves the URI validation bypass by ensuring URI-safe checks are not skipped when a caller-supplied predicate returns true; upgrade immediately via npm install dompurify@3.3.2 or equivalent. Full details are in the vendor advisory at https://github.com/cure53/DOMPurify/security/advisories/GHSA-cjmm-f4jc-qw8r. For teams unable to upgrade immediately, the most effective compensating control is to remove or restrict use of EXTRA_ELEMENT_HANDLING.attributeCheck with ADD_ATTR predicates that return true for URI-bearing attributes such as href, src, or action; this eliminates the short-circuit path entirely. If the custom predicate is operationally required, add an explicit URI scheme blocklist within the predicate itself (e.g., reject values matching ^javascript: or ^vbscript: before returning true) as a temporary measure - note this shifts safety enforcement from the library to application code and must be treated as a stopgap only, as scheme detection in application code is error-prone and may be bypassed by encoding variants.

Affected VersionsENISA

DOMPurify 0 <3.3.2

Affected Packages

npm dompurify fix: 3.3.2

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 JavaScript HTML sanitization library designed to strip dangerous markup before DOM insertion. The EXTRA_ELEMENT_HANDLING.attributeCheck API allows callers to extend attribute allowlisting by passing a predicate function as ADD_ATTR. Internally, _isValidAttribute evaluates this predicate before performing URI-safe validation; when the predicate returns true, the function exits early, skipping the check that would otherwise block javascript:, vbscript:, and other unsafe URI schemes. The root cause maps to CWE-79 (Improper Neutralization of Input During Web Page Generation): caller-controlled logic is permitted to override a core sanitization invariant, breaking the library's safety contract. The vulnerability was identified by Cantina's Apex security team.

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 EXTRA_ELEMENT_HANDLING.attributeCheck configuration required, a condition beyond the attacker's control; S:C and C:L/I:L capture DOM-based XSS cross-context impact on the victim's browser session.

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

DOMPurify before 3.3.2 contains a URI validation bypass vulnerability when ADD_ATTR is provided as a predicate function via EXTRA_ELEMENT_HANDLING.attributeCheck. Attackers can supply a predicate that accepts specific attribute and tag combinations to bypass URI-safe validation, allowing unsafe protocols like javascript: to survive sanitization and execute as DOM-based XSS when the link is activated.

Blast Radius

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

Ecosystem-wide dependent count for version 3.3.2.

Threat Intelligence Overview

EPSS Score
0.2%
Top 94% exploitable
Prevalence
High
dominant npm HTML sanitization library with tens of millions of weekly downloads
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-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

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