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

Medium 6.9 Published Updated

Prototype pollution allows bypassing DOMPurify sanitization, enabling XSS attacks via injected custom elements and attributes.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-41238?

CVE-2026-41238 is a medium-severity cross-site scripting vulnerability in cure53 DOMPurify, published on 23 Apr 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

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.

Weakness: CWE-79, CWE-1321

Which versions are affected by CVE-2026-41238?

2 open source packages ship an affected version, including dompurify.

PackageAffectedFixed in
dompurify npmFrom 3.0.13.4.0
dompurify npmFrom 3.0.13.4.0

How do I fix CVE-2026-41238?

Upgrade dompurify to 3.4.0 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-41238 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-41238 exists.

Sources

Also known as CLEANSTART-2026-AM93725, CLEANSTART-2026-NT67628, DEBIAN-CVE-2026-41238, ECHO-951f-211f-5fc7, GHSA-v9jr-rg53-9pgp, MINI-3gqp-x9f3-2wrx and 12 more.

Is CVE-2026-41238 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free