CVE-2026-41240

DOMPurify: FORBID_TAGS bypassed by function-based ADD_TAGS predicate (asymmetry with FORBID_ATTR fix)

MEDIUM
6.1
CVSS Score
Published: April 23, 2026 at 02:54 PM UTC
Updated: June 17, 2026 at 10:46 AM UTC
1 product affected across 1 vendorDOMPurify

Using DOMPurify by cure53?

Get instant alerts when new vulnerabilities affect DOMPurify - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM6.1
Exploit prediction
EPSS 0.3%
SSVC
PoC

Description

DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Versions prior to 3.4.0 have an inconsistency between FORBID_TAGS and FORBID_ATTR handling when function-based ADD_TAGS is used. Commit c361baa added an early exit for FORBID_ATTR at line 1214. The same fix was not applied to FORBID_TAGS. At line 1118-1123, when EXTRA_ELEMENT_HANDLING.tagCheck returns true, the short-circuit evaluation skips the FORBID_TAGS check entirely. This allows forbidden elements to survive sanitization with their attributes intact. Version 3.4.0 patches the issue.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 3.4.0
Affected range stops below 3.4.0, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (3)

x_refsource_CONFIRMExploitMitigationPatchVendor Advisory
Source: cverecord
https://github.com/cure53/DOMPurify/security/advisories/GHSA-h7mw-gpvr-xq4m
x_refsource_MISCProductRelease Notes
Source: cverecord
https://github.com/cure53/DOMPurify/releases/tag/3.4.0

SSVC — Action Prioritization

SSVCPoCNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
CHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusANALYZED
CWE
CWE-183CWE-79

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card