# CVE-2026-109345: DOMPurify cross-site scripting in IN_PLACE mode sanitization

Source: https://junglewise.ai/threats/cve-2026-109345-dompurify-before-3-4-16-contains-a-cross-site-scripting  
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-109345 · Severity: medium · CVSS 6.1 · Published 2026-10-12

DOMPurify is a JavaScript library that sanitizes HTML to prevent malicious content. Versions before 3.4.16 fail to sanitize text content within certain HTML elements when using IN_PLACE mode, allowing attackers to inject malicious script code. An attacker can craft a style element containing a payload that executes when an application re-parses the returned node, potentially leading to script execution 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-109345 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-109345 being exploited in the wild.

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

**Which products and versions are affected?** Cure53 DOMPurify before 3.4.16.

**Is there a fix for CVE-2026-109345?** 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-109345 attacked?** It is attacked over the network.

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

The vulnerability exists in DOMPurify's IN_PLACE sanitization mode when processing rawtext elements like &lt;style&gt;. While the _neutralizeSubtree function strips dangerous attributes from removed nodes, it does not sanitize text content, which can contain attacker-supplied markup. An attacker supplies a style element with text content like "&lt;/style&gt;&lt;img src=x onerror=payload&gt;" which bypasses the text-only sanitization check. Exploitation requires the application to serialize the returned node and re-parse it in HTML context.

## Affected products

- Cure53 DOMPurify before 3.4.16

## Timeline

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

## References

- [https://github.com/cure53/DOMPurify/security/advisories/GHSA-6688-9rhm-gjv2](https://github.com/cure53/DOMPurify/security/advisories/GHSA-6688-9rhm-gjv2)
- [https://www.vulncheck.com/advisories/dompurify-before-3.4.16-xss-via-in-place-returned-rawtext-root](https://www.vulncheck.com/advisories/dompurify-before-3.4.16-xss-via-in-place-returned-rawtext-root)

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