Vulnerability · Published Jul 23, 2026 · Assigned by VulnCheck
CVE-2026-65904DOMPurify through 3.3.3 Cross-Site Scripting via IN_PLACE mode
Medium 4.7
In plain English
A medium-severity security flaw in DOMPurify from cure53. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 19% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
DOMPurify through 3.3.3 fails to sanitize DOM elements passed via IN_PLACE mode when the element originates from a different window/realm (e.g., an iframe's contentDocument). A cross-realm instanceof check in the private _isNode() function returns false for foreign-realm nodes, causing DOMPurify to stringify the element (yielding '[object HTMLDivElement]'), silently reset IN_PLACE to false, and return the unsanitized element unchanged with any XSS payloads intact.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | node-dompurify | no fix listed | DEBIAN-CVE-2026-65904 |
| Debian:13 | node-dompurify | no fix listed | DEBIAN-CVE-2026-65904 |
| Debian:14 | node-dompurify | 3.4.5+dfsg-1 | DEBIAN-CVE-2026-65904 |
| Ubuntu:22.04:LTS | node-dompurify | no fix listed | UBUNTU-CVE-2026-65904 |
| Ubuntu:24.04:LTS | node-dompurify | no fix listed | UBUNTU-CVE-2026-65904 |
| Ubuntu:26.04:LTS | node-dompurify | no fix listed | UBUNTU-CVE-2026-65904 |
Affected products (as reported)
Weakness: CWE-754 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
References
- GitHub Security Advisory (GHSA-4w3q-35jp-p934) vendor-advisory
- VulnCheck Advisory: DOMPurify before 3.4.4 Cross-Site Scripting via IN_PLACE mode third-party-advisory