# CVE-2026-65901: cure53 DOMPurify XSS in IN_PLACE mode via nodeName clobbering

Source: https://junglewise.ai/threats/cve-2026-65901-cure53-dompurify-xss-in-in-place-mode-via-nodename-clobbering  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-23. Updated: 2026-07-23  
License: CC BY 4.0 with a link back

CVE-2026-65901 · Severity: medium · CVSS 6.1 · Published 2026-07-23

DOMPurify is a popular library used to clean and sanitize HTML to prevent malicious code from running in web browsers. A vulnerability exists where the library fails to properly inspect certain types of live web elements when running in a specific 'in-place' mode. This could allow an attacker to bypass security filters and execute malicious scripts (Cross-Site Scripting) in a user's browser, potentially leading to unauthorized actions or data theft.

Technologies: [dompurify (npm)](https://junglewise.ai/threats/technologies/dompurify). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-65901 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-65901 being exploited in the wild.

**How severe is CVE-2026-65901?** Medium severity, with a CVSS score of 6.1, published 23 July 2026.

**Which products and versions are affected?** dompurify (npm) SEMVER:introduced=0,last_affected=3.4.6.

**Is there a fix for CVE-2026-65901?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-65901 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-65901?** Check whether you run dompurify (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A cross-site scripting (XSS) vulnerability exists in DOMPurify through version 3.4.6 when using the `IN_PLACE: true` configuration. The root cause is that the `_sanitizeElements` function trusts the `nodeName` property of live non-form nodes without verifying it against the trusted prototype getter. An attacker can provide a hostile live DOM object (e.g., from a same-origin iframe or popup) where a `<script>` element's `nodeName` is clobbered to appear as an allowed element like `<div>`. Because the library's clobbering protection was previously scoped only to `<form>` elements, the malicious script is retained during sanitization and executes when the tree is inserted into the document. This bypass affects live node references but does not affect string-based sanitization.

## Affected products

- cure53 DOMPurify <= 3.4.6

## Identifiers

- CVE-2026-65901
- GHSA-x4vx-rjvf-j5p4

## Timeline

- 2026-05-27: advisory: GitHub Security Advisory published by cure53
- 2026-07-23: disclosed: CVE-2026-65901 published

## References

- [https://github.com/cure53/DOMPurify/security/advisories/GHSA-x4vx-rjvf-j5p4](https://github.com/cure53/DOMPurify/security/advisories/GHSA-x4vx-rjvf-j5p4)
- [https://www.vulncheck.com/advisories/dompurify-cross-site-scripting-via-in-place-nodename](https://www.vulncheck.com/advisories/dompurify-cross-site-scripting-via-in-place-nodename)

## Related threats

- [DOMPurify SAFE_FOR_TEMPLATES bypass in shadow root content](https://junglewise.ai/threats/dompurify-safe-for-templates-bypass-split-template-expressions-survive-c23665cf)
- [DOMPurify IN_PLACE event handler bypass when hook removes parent or sibling](https://junglewise.ai/threats/dompurify-in-place-hook-that-removes-a-parent-or-sibling-leaves-the-3ea5d18f)
- [DOMPurify SMIL attributeName=href guard bypass in XHTML mode](https://junglewise.ai/threats/dompurify-smil-attributename-href-guard-is-skipped-when-parser-media-15a5efd2)
- [DOMPurify IN_PLACE mode XSS via rawtext element text content](https://junglewise.ai/threats/dompurify-in-place-returns-a-force-removed-rawtext-root-whose-text-16d9ac9e)
- [DOMPurify DOM XSS in IN_PLACE mode with afterSanitize hooks](https://junglewise.ai/threats/dompurify-in-place-node-removing-aftersanitize-hook-leaves-detached-3087e7fd)
