CVE-2026-65904 PUBLISHED

DOMPurify before 3.4.4 Cross-Site Scripting via IN_PLACE mode

Assigner: VulnCheck
Reserved: 23.07.2026 Published: 23.07.2026 Updated: 23.07.2026

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. The vendor considers this an edge case outside DOMPurify's threat model and, at time of publication, no fix was planned.

Metrics

CVSS Vector: CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
CVSS Score: 2.3

Product Status

Vendor cure53
Product DOMPurify
Versions Default: unaffected
  • affected from 0 to 3.4.4 (excl.)
  • Version 3.4.4 is unaffected

Credits

  • fg0x0 reporter

References

Problem Types

  • Improper Check for Unusual or Exceptional Conditions CWE