Skip to main content

DOMPurify EUVDEUVD-2026-48272

| CVE-2026-65903 MEDIUM
Incorrect Comparison (CWE-697)
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 app using ADD_TAGS function form with FORBID_TAGS overlap
  2. Delivery
    Craft HTML containing FORBID_TAGS-listed element
  3. Exploit
    Submit crafted payload as user-supplied content
  4. Execution
    DOMPurify short-circuits, retains forbidden tag in sanitized output
  5. Persist
    Application renders sanitized output in browser
  6. Impact
    Forbidden tag executes, achieving XSS or injection

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Incorrect comparison
Exploitation Conditions

Exploitation requires the target application to configure DOMPurify with ADD_TAGS in its function/callback form (specifically via EXTRA_ELEMENT_HANDLING.tagCheck), AND to specify overlapping entries in FORBID_TAGS for tags that the callback would approve. This is a non-default, advanced usage pattern; applications using ADD_TAGS as a plain array (the common case) are entirely unaffected. CVSS UI:A (active user interaction) confirms that user-submitted input must be processed and the resulting sanitized HTML must be rendered in a browser context. Exploitation is limited to: (1) DOMPurify versions <= 3.3.3; (2) the function form of ADD_TAGS, not the array form; (3) applications that also set FORBID_TAGS on overlapping tags; and (4) a browser-rendering context where the retained forbidden tag is meaningful. Authentication requirements are not confirmed from available data - the attacker's ability to submit input depends entirely on the application's own access controls.

Impact

The provided CVSS 4.0 score of 5.1 with SC:L/SI:L captures the real-world impact reasonably well: this is a subsequent-system (browser/renderer) integrity and confidentiality issue, not a direct server-side compromise. UI:A correctly reflects that a user or process must submit crafted input and render the output. The most critical limiting factor not fully reflected in that score is attack complexity: exploitation requires a very specific, non-default configuration where ADD_TAGS is used in its function callback form (not the common array form) AND the same tags appear in FORBID_TAGS - the advisory itself labels this 'Config-dependent.' No EPSS score was provided; no KEV listing exists. No public proof-of-concept has been identified in the provided intelligence. Real-world risk is therefore low-to-medium despite the library's broad deployment: the majority of DOMPurify consumers use ADD_TAGS as a plain array, which is entirely unaffected. Applications combining the function form with explicit FORBID_TAGS for the same tags - a defensive pattern suggesting heightened security intent - paradoxically bear the highest risk.

Exploit ScenarioDerived

A developer configures DOMPurify with ADD_TAGS as a tagCheck callback that approves custom elements and also sets FORBID_TAGS to block specific tags (e.g., 'script' or a custom dangerous element). An attacker submits crafted HTML containing one of those forbidden-but-ADD_TAGS-approved tags; DOMPurify's short-circuit logic retains the tag in sanitized output. When the application renders that output in a browser, the forbidden tag executes - enabling XSS, data exfiltration, or UI redress depending on the tag type. No public PoC is available, but the advisory provides enough detail for an experienced researcher to reproduce the issue.

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 versions up to and including 3.3.3 incorrectly resolves a tag-allow conflict when ADD_TAGS is used in its function form alongside FORBID_TAGS, causing forbidden tags to survive sanitization. The flaw is a short-circuit evaluation error in purify.ts (lines 1117-1123): when the ADD_TAGS callback (tagCheck) returns true for a tag, the Boolean AND short-circuits, meaning FORBID_TAGS is never consulted - directly contradicting the attribute-side behavior where FORBID_ATTR always wins. An attacker who can supply HTML to an application using this specific configuration can inject tags the developer explicitly intended to block, leading to XSS or related injection in whatever context the sanitized output is rendered. No public exploit code has been identified and the vulnerability is not listed in CISA KEV at time of analysis.

RemediationAI

Vendor-released patch: DOMPurify 3.4.0. Upgrade via npm (npm install dompurify@3.4.0 or npm install dompurify@latest) or update the lockfile pinning. The fix restructures the tag-check condition to evaluate FORBID_TAGS before tagCheck, consistent with the attribute-side pattern. See the GitHub advisory GHSA-39q2-94rc-95cp at https://github.com/cure53/DOMPurify/security/advisories/GHSA-39q2-94rc-95cp for patch details. If immediate upgrade is not possible, the most effective workaround is to stop using ADD_TAGS as a function (EXTRA_ELEMENT_HANDLING.tagCheck) and convert to the array form of ADD_TAGS - this entirely avoids the vulnerable code path with no functional side effects for most use cases. If the function form is required, move FORBID_TAGS enforcement into a post-sanitization step that strips the relevant tags from DOMPurify output, noting that post-processing introduces a second parse and its own risk of parser differential. Do not rely on FORBID_TAGS alone for security guarantees in configurations using the function ADD_TAGS form on versions <= 3.3.3.

Affected VersionsENISA

DOMPurify 0 <3.4.0

Affected Packages

npm dompurify fix: 3.4.0

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 the dominant HTML sanitization library in the JavaScript ecosystem, authored by cure53. Its core sanitization loop evaluates each parsed tag against allow/block lists to produce safe output. The vulnerability manifests specifically in EXTRA_ELEMENT_HANDLING.tagCheck - the function form of ADD_TAGS - where the composite Boolean condition !(tagCheck(tagName)) && (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) short-circuits: a truthy tagCheck result makes the outer AND false, so the element is kept and FORBID_TAGS is never evaluated. The attribute side (line 1214) correctly places if (FORBID_ATTR[lcName]) { continue; } first, creating an asymmetric inconsistency. CWE-697 (Incorrect Comparison) describes the root cause precisely - the comparison logic produces the wrong truth value in the overlapping ADD_TAGS-function + FORBID_TAGS case, not a missing check but a logically incorrect ordering of operands.

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 configuration prerequisite (ADD_TAGS function form plus overlapping FORBID_TAGS); S:C and C:L/I:L capture downstream XSS impact in the browser rendering 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

DOMPurify before 3.4.0 contains a logic error in the ADD_TAGS function where short-circuit evaluation allows forbidden tags to bypass FORBID_TAGS restrictions. Attackers can craft input containing tags listed in FORBID_TAGS that are also added via ADD_TAGS function, causing them to be retained in sanitized output.

Blast Radius

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

Ecosystem-wide dependent count for version 3.4.0.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
High
dominant JS HTML sanitizer, present across vast web app ecosystem
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 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
No
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

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

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