Medium severity · published Apr 23, 2026
CVE-2026-41238
DOMPurify: Prototype Pollution to XSS Bypass via CUSTOM_ELEMENT_HANDLING Fallback
6.9
CVSS
0.3%
EPSS
No
On KEV
Description
DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Versions 3.0.1 through 3.3.3 are vulnerable to a prototype pollution-based XSS bypass. When an application uses `DOMPurify.sanitize()` with the default configuration (no `CUSTOM_ELEMENT_HANDLING` option), a prior prototype pollution gadget can inject permissive `tagNameCheck` and `attributeNameCheck` regex values into `Object.prototype`, causing DOMPurify to allow arbitrary custom elements with arbitrary attributes — including event handlers — through sanitization. Version 3.4.0 fixes the issue.
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:N
Attack vector
Network
Complexity
High
Privileges
None
User interaction
Required
Confidentiality
High
Integrity
Low
Availability
None
Scope
Changed
Exploitation
Is it being used?
Exploit prediction (EPSS)0.3% · higher than 19% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
DO
DOMPurify · cure53
>= 3.0.1, < 3.4.0 · source: vendor
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-41238
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-41238
github.com
https://github.com/cure53/DOMPurify/releases/tag/3.4.0
github.com
https://github.com/cure53/DOMPurify/security/advisories/GHSA-v9jr-rg53-9pgp
More from DOMPurify
9.8
CVE-2024-48910
DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG
8.2
CVE-2026-47423
DOMPurify XSS via `selectedcontent` re-clone
7.2
CVE-2026-65898
DOMPurify before 3.4.11 Permanent Attribute Allowlist Pollution via setConfig
6.8
CVE-2026-41239
DOMPurify has a SAFE_FOR_TEMPLATES bypass in RETURN_DOM mode
6.1
CVE-2026-116804
DOMPurify from 3.4.4 before 3.4.17 SAFE_FOR_TEMPLATES Bypass via Shadow Root Content
