# CVE-2026-109344: DOMPurify cross-site scripting in IN_PLACE mode with afterSanitize hooks

Source: https://junglewise.ai/threats/cve-2026-109344-dompurify-from-3-4-13-before-3-4-16-contains-a-cross-site  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-12. Updated: 2026-10-16  
License: CC BY 4.0 with a link back

CVE-2026-109344 · Severity: medium · CVSS 6.1 · Published 2026-10-12

DOMPurify is a JavaScript library that sanitizes HTML to prevent malicious code execution. When using IN_PLACE mode with certain hooks, the library fails to neutralize event handlers on DOM elements removed during sanitization, leaving them armed on the live page. An attacker can supply markup with malicious event handlers that survive the sanitization process and execute in the victim's browser.

Technologies: [Cure53 DOMPurify](https://junglewise.ai/threats/technologies/cure53-dompurify). Vendors: [Cure53](https://junglewise.ai/threats/vendors/cure53).

## Quick answers

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

**How severe is CVE-2026-109344?** Medium severity, with a CVSS score of 6.1, published 12 October 2026.

**Which products and versions are affected?** Cure53 DOMPurify 3.4.13 through 3.4.15.

**Is there a fix for CVE-2026-109344?** Yes: fixed in 3.4.16. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-109344 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-109344?** Check whether you run Cure53 DOMPurify 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

- Fixed in 3.4.16

## Technical details

A cross-site scripting vulnerability exists when IN_PLACE mode processes markup and an afterSanitizeElements or afterSanitizeAttributes hook removes a non-root element; the library's neutralization routine is only wired into beforeSanitizeElements and uponSanitizeElement hooks, leaving descendant on* handlers armed on detached subtrees. An attacker supplies markup containing event handlers (e.g., &lt;img onerror&gt;) inside a wrapper element that a removal hook detaches; after sanitize() returns, the queued handler fires in the victim's page origin, achieving DOM XSS. A fix is available in version 3.4.16.

## Affected products

- cure53 DOMPurify 3.4.13 through 3.4.15

## Timeline

- 2026-09-23: disclosed
- 2026-10-12: advisory

## References

- [https://github.com/cure53/DOMPurify/security/advisories/GHSA-p98j-92pf-mc4p](https://github.com/cure53/DOMPurify/security/advisories/GHSA-p98j-92pf-mc4p)
- [https://www.vulncheck.com/advisories/dompurify-from-3.4.13-before-3.4.16-dom-xss-via-in-place-aftersanitize-hooks](https://www.vulncheck.com/advisories/dompurify-from-3.4.13-before-3.4.16-dom-xss-via-in-place-aftersanitize-hooks)

## Related threats

- [DOMPurify SAFE_FOR_TEMPLATES bypass via shadow root content](https://junglewise.ai/threats/cve-2026-116804-dompurify-from-3-4-4-before-3-4-17-contains-a-safe-for-templates)
- [DOMPurify DOM XSS in IN_PLACE hook-detached subtrees](https://junglewise.ai/threats/cve-2026-116803-dompurify-before-3-4-17-contains-a-cross-site-scripting)
- [DOMPurify cross-site scripting in SMIL attributeName guard bypass](https://junglewise.ai/threats/cve-2026-116802-dompurify-before-3-4-17-contains-a-cross-site-scripting)
- [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)
