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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | node-dompurify | no fix listed | DEBIAN-CVE-2026-41238 |
| Debian:13 | node-dompurify | no fix listed | DEBIAN-CVE-2026-41238 |
| Debian:14 | node-dompurify | 3.4.1+dfsg-1 | DEBIAN-CVE-2026-41238 |
| Ubuntu:22.04:LTS | node-dompurify | no fix listed | UBUNTU-CVE-2026-41238 |
| Ubuntu:24.04:LTS | node-dompurify | no fix listed | UBUNTU-CVE-2026-41238 |
| Ubuntu:25.10 | node-dompurify | no fix listed | UBUNTU-CVE-2026-41238 |
| Ubuntu:26.04:LTS | node-dompurify | no fix listed | UBUNTU-CVE-2026-41238 |
| Ubuntu:26.10 | node-dompurify | no fix listed | UBUNTU-CVE-2026-41238 |
| npm | dompurify | 3.4.0 | GHSA-v9jr-rg53-9pgp |
Affected products (as reported)
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
- https://github.com/cure53/DOMPurify/security/advisories/GHSA-v9jr-rg53-9pgp x_refsource_CONFIRM
- https://github.com/cure53/DOMPurify/releases/tag/3.4.0 x_refsource_MISC