---
id: "CVE-2026-116803"
kind: "vulnerability"
aliases: ["CVE-2026-116803"]
title: "DOMPurify: IN_PLACE hook removal leaves event handlers active, enabling XSS"
severity: "medium"
cvss: 6.1
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["browser", "dompurify", "frontend", "javascript", "package"]
not_affected_if: ["no-in-place-hooks", "version-3.4.17-or-later"]
published_at: "2026-10-27T00:17:11+00:00"
first_seen_at: "2026-10-27T00:25:55+00:00"
updated_at: "2026-10-27T00:26:37+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116803", "first_seen_at": "2026-10-27T00:25:55+00:00"}]
---

# DOMPurify: IN_PLACE hook removal leaves event handlers active, enabling XSS

DOMPurify before 3.4.17 fails to neutralize markup in detached subtrees when an IN_PLACE hook removes a parent or sibling node. Attacker-supplied handlers such as img onerror still fire after sanitize() returns, giving the attacker DOM-based cross-site scripting.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed version with `npm ls dompurify` or by reading `node_modules/dompurify/package.json`
- Search the codebase for `IN_PLACE` hooks used with `DOMPurify.sanitize`

## Fix

- Upgrade DOMPurify to `3.4.17` or later
- Rebuild and redeploy front-end bundles that include DOMPurify

## Timeline

- 2026-10-27T00:25:55+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-116803

## From the sources

DOMPurify before 3.4.17 contains a cross-site scripting vulnerability that allows attackers to keep event handlers armed when an IN_PLACE hook removes a parent or sibling node. Attacker markup in detached subtrees is never walked or neutralized, so handlers like img onerror fire after sanitize() returns, causing DOM XSS.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
