CVE-2026-65904: DOMPurify through 3.3.3 Cross-Site Scripting via IN_PLACE mode

Published Jul 23, 2026
·
Updated

DOMPurify through 3.3.3 fails to sanitize DOM elements passed via INPLACE 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 INPLACE to false, and return the unsanitized element unchanged with any XSS payloads intact.

Affected Software

1 affected component
DOMPurify DOMPurify<=3.3.3

Event History

Jul 23, 2026
CVE Published
via MITRE·01:16 PM
Data Sourced
via MITRE·01:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:18 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-65904?

The severity of CVE-2026-65904 is rated as medium with a score of 4.7.

2

What type of vulnerability is identified in CVE-2026-65904?

CVE-2026-65904 is a Cross-Site Scripting (XSS) vulnerability.

3

How do I fix CVE-2026-65904?

To fix CVE-2026-65904, update DOMPurify to version 3.4.4 or later.

4

What is the impact of CVE-2026-65904?

CVE-2026-65904 can lead to XSS attacks when using IN_PLACE mode with content from a different window or realm.

5

Which versions of DOMPurify are affected by CVE-2026-65904?

Versions of DOMPurify earlier than 3.4.4 are affected by CVE-2026-65904.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203