CVE-2026-65904

NameCVE-2026-65904
DescriptionDOMPurify 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. The vendor considers this an edge case outside DOMPurify's threat model and, at time of publication, no fix was planned.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
node-dompurify (PTS)bookworm2.4.1+dfsg+~2.4.0-2+deb12u1vulnerable
bookworm (security)2.4.1+dfsg+~2.4.0-2vulnerable
trixie3.1.7+dfsg+~3.0.5-2vulnerable
forky, sid3.4.12+dfsg-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
node-dompurifysource(unstable)3.4.5+dfsg-1

Notes

https://github.com/cure53/DOMPurify/security/advisories/GHSA-4w3q-35jp-p934

Search for package or bug name: Reporting problems