CVE-2026-41240

MEDIUM CVSS 4.0: 6.0 EPSS 0.33%
Updated Oct 27, 2026
Cure53
Parameter Value
CVSS 6.0 (MEDIUM)
Affected Versions before 3.4.0
Fixed In 3.4.0
Type CWE-79 (Cross-Site Scripting (XSS)), CWE-183
Vendor Cure53
Public PoC No

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.

Attack Parameters

Attack Vector
Network
Can be exploited remotely
Attack Complexity
Low
Easy to exploit
Attack Requirements
Present
Additional conditions required
Privileges Required
None
No privileges needed
User Interaction
Passive
Minimal interaction

Impact Assessment

Confidentiality
None
No data leak
Integrity
High
Complete data modification
Availability
None
No disruption

CVSS Vector v4.0

Vulnerable Products 1

Configuration From (including) Up to (excluding)
Cure53 Dompurify
cpe:2.3:a:cure53:dompurify:*:*:*:*:*:*:*:*
— 3.4.0