# CVE-2026-49459: cure53 DOMPurify XSS via DOM Clobbering in IN_PLACE mode

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

CVE-2026-49459 · Severity: medium · CVSS 6.1 · Published 2026-07-14

DOMPurify is a security library used to clean HTML and prevent malicious scripts from running in web browsers. A flaw in its "in-place" sanitization mode allows an attacker to bypass security checks by using a technique called DOM Clobbering. If a developer uses this specific mode to sanitize a form that contains malicious elements, the library may fail to remove dangerous event handlers (like "onclick"), potentially leading to account takeover or data theft via Cross-Site Scripting (XSS).

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

## Quick answers

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

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

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

**Is there a fix for CVE-2026-49459?** Yes. dompurify (npm): upgrade to 3.4.6 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

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

**Am I affected by CVE-2026-49459?** 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.

## How to fix

- dompurify (npm): upgrade to 3.4.6 or later

  ```sh
  npm install dompurify@3.4.6
  ```


## Technical details

A vulnerability exists in DOMPurify's `IN_PLACE` sanitization mode where the library fails to strip event-handler attributes from a root `<form>` element if it is "clobbered" by its descendants. When `DOMPurify.sanitize(root, { IN_PLACE: true })` is called on a detached node, the `_forceRemove` function fails to detach the node because it has no parent, and `_sanitizeAttributes` returns early without inspecting attributes if `_isClobbered` returns true. An attacker can trigger this by placing a descendant element with a `name` attribute that shadows internal properties like `nodeName` or `setAttribute`. This allows malicious event handlers (e.g., `onmouseover`) on the root element to persist and execute. The issue is fixed in version 3.4.6 by hardening checks for clobbered nodes and ensuring attributes are stripped even on parent-less roots.

## Affected products

- cure53 DOMPurify < 3.4.6

## Identifiers

- CVE-2026-49459
- GHSA-r47g-fvhr-h676

## Timeline

- 2026-05-26: patched: Version 3.4.6 released
- 2026-05-26: advisory: GitHub Security Advisory GHSA-r47g-fvhr-h676 published
- 2026-07-14: disclosed: CVE-2026-49459 published to NVD

## References

- [https://github.com/cure53/DOMPurify/commit/bb7739e5bccec7e1ab3dae3f3e42d02db3acaaae](https://github.com/cure53/DOMPurify/commit/bb7739e5bccec7e1ab3dae3f3e42d02db3acaaae)
- [https://github.com/cure53/DOMPurify/releases/tag/3.4.6](https://github.com/cure53/DOMPurify/releases/tag/3.4.6)
- [https://github.com/cure53/DOMPurify/security/advisories/GHSA-r47g-fvhr-h676](https://github.com/cure53/DOMPurify/security/advisories/GHSA-r47g-fvhr-h676)

## 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)
