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

- Severity: Medium 6.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.28%, higher than 21% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-22T17:31:32.000Z
- Modified: 2026-10-26T22:10:00.163Z
- Also known as: GHSA-v9jr-rg53-9pgp
- Weaknesses: CWE-79, CWE-1321
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- cure53 DOMPurify: >= 3.0.1, < 3.4.0
- dompurify (npm): from 3.0.1 before 3.4.0

## Every score

- GitHub_M: CVSS:3.1 6.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:N`
- GitHub: CVSS:3.1 6.9 Medium `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> (exploit, web)
- <https://github.com/cure53/DOMPurify/releases/tag/3.4.0> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-41238> (advisory)
- <https://github.com/cure53/DOMPurify> (package)

## Sources

- CVE List: [CVE-2026-41238](https://www.cve.org/CVERecord?id=CVE-2026-41238), CVE Terms of Use, modified 2026-04-23
- GitHub Advisory Database: [GHSA-v9jr-rg53-9pgp](https://github.com/advisories/GHSA-v9jr-rg53-9pgp), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-41238](https://nvd.nist.gov/vuln/detail/CVE-2026-41238), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-41238 · Whole record: https://cve.day/CVE-2026-41238.json · Rebuilt by cve.day 2026-11-25T22:59:19.392Z
