Vulnerability · Published Apr 23, 2026 · Assigned by GitHub_M

CVE-2026-41238DOMPurify: Prototype Pollution to XSS Bypass via CUSTOM_ELEMENT_HANDLING Fallback

Medium 6.9

In plain English

A medium-severity cross-site scripting in DOMPurify from cure53. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 19% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.9Medium
Exploit odds (30 days)0.3%top 80.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12node-dompurifyno fix listedDEBIAN-CVE-2026-41238
Debian:13node-dompurifyno fix listedDEBIAN-CVE-2026-41238
Debian:14node-dompurify3.4.1+dfsg-1DEBIAN-CVE-2026-41238
Ubuntu:22.04:LTSnode-dompurifyno fix listedUBUNTU-CVE-2026-41238
Ubuntu:24.04:LTSnode-dompurifyno fix listedUBUNTU-CVE-2026-41238
Ubuntu:25.10node-dompurifyno fix listedUBUNTU-CVE-2026-41238
Ubuntu:26.04:LTSnode-dompurifyno fix listedUBUNTU-CVE-2026-41238
Ubuntu:26.10node-dompurifyno fix listedUBUNTU-CVE-2026-41238
npmdompurify3.4.0GHSA-v9jr-rg53-9pgp

Affected products (as reported)

VendorProductVersions
cure53 DOMPurify >= 3.0.1, < 3.4.0

Weakness: CWE-79, CWE-1321 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:N

References