Skip to content
OpenAdvisories
Medium · 6.9 CVE-2026-41238 EUVD-2026-25236GHSA-v9jr-rg53-9pgp

DOMPurify: Prototype Pollution to XSS Bypass via CUSTOM_ELEMENT_HANDLING Fallback

Published Apr 23, 2026 · Updated Apr 23, 2026 · 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.

Affected products

VendorProductAffectedFixed
cure53 DOMPurify >= 3.0.1, < 3.4.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 node-dompurify 3.4.1+dfsg-1 —
Debian 13 node-dompurify No fix yet —
Debian 12 node-dompurify No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 node-dompurify No fix yet —
Ubuntu 26.04 LTS node-dompurify No fix yet —
Ubuntu 25.10 node-dompurify No fix yet —
Ubuntu 24.04 LTS node-dompurify No fix yet —
Ubuntu 22.04 LTS node-dompurify No fix yet —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling nextcloud-server-33 33.0.6-r0 —
Wolfi rolling opensearch-dashboards-3 3.6.0-r3 —

Affected packages

EcosystemPackageAffectedFixedRecord
npm dompurify >= 3.0.1, < 3.4.0 3.4.0 GHSA-v9jr-rg53-9pgp

Advisories 2

References