CVE-2026-41240

6.1 MEDIUM
Published: April 23, 2026 Modified: April 29, 2026
View on NVD

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.

AI Explanation

Get an AI-powered plain-language explanation of this vulnerability and remediation steps.

Login to generate AI explanation

CVSS v3.x Details

0.0 Low Medium High Critical 10.0
Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

References to Advisories, Solutions, and Tools

Patch Vendor Advisory Exploit Third Party Advisory
https://github.com/cure53/DOMPurify/releases/tag/3.4.0
Source: security-advisories@github.com
Product Release Notes
https://github.com/cure53/DOMPurify/security/advisories/GHSA-h7mw-gpvr-xq4m
Source: security-advisories@github.com
Exploit Mitigation Patch Vendor Advisory
https://github.com/cure53/DOMPurify/security/advisories/GHSA-h7mw-gpvr-xq4m
Source: 134c704f-9b21-4f2e-91b3-4a467353bcc0
Exploit Mitigation Patch Vendor Advisory

4 reference(s) from NVD

Quick Stats

CVSS v3 Score
6.1 / 10.0
EPSS (Exploit Probability)
0.0%
10th percentile
Exploitation Status
Not in CISA KEV

Weaknesses (CWE)

Affected Vendors

cure53