Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. dompurify
  4. ›
  5. CVE-2026-41238

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

April 22, 2026 (updated April 27, 2026)

DOMPurify versions 3.0.1 through 3.3.3 (latest) 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.

References

  • github.com/advisories/GHSA-v9jr-rg53-9pgp
  • github.com/cure53/DOMPurify
  • github.com/cure53/DOMPurify/releases/tag/3.4.0
  • github.com/cure53/DOMPurify/security/advisories/GHSA-v9jr-rg53-9pgp
  • nvd.nist.gov/vuln/detail/CVE-2026-41238

Code Behaviors & Features

Detect and mitigate CVE-2026-41238 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 3.0.1 before 3.4.0

Fixed versions

  • 3.4.0

Solution

Upgrade to version 3.4.0 or above.

Impact 6.9 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/dompurify/CVE-2026-41238.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:18:57 +0000.