# CVE-2026-109345: DOMPurify before 3.4.16 XSS via IN_PLACE Returned Rawtext Root

> Attackers can bypass sanitization in DOMPurify's IN_PLACE mode to execute arbitrary scripts via crafted style elements, affecting applications using this library.

- **Severity:** Medium 5.1 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 12 Oct 2026
- **Updated:** 13 Oct 2026
- **Also known as:** CLSA-2026-1791626851, CLSA-2026-1791626965, CLSA-2026-1791627235, CLSA-2026-1791627414, CLSA-2026-1791627570, CLSA-2026-1791627799, CLSA-2026-1791667159, CLSA-2026-1791667324, CLSA-2026-1791668940, CLSA-2026-1791795543, CLSA-2026-1791795654, CLSA-2026-1791798632, CLSA-2026-1791798802, CLSA-2026-1791799053, CLSA-2026-1791806404, CLSA-2026-1791806518, CLSA-2026-1791806624, CLSA-2026-1791814922, CLSA-2026-1791821318, CLSA-2026-1791821442, CLSA-2026-1791825519, CLSA-2026-1791846572, CLSA-2026-1791849675, CLSA-2026-1791888656, CLSA-2026-1791908220, CLSA-2026-1791988201, CLSA-2026-1792001523, CLSA-2026-1792155744, CLSA-2026-1792231043, DEBIAN-CVE-2026-109345, ECHO-f9c7-e65b-f387, GHSA-6688-9rhm-gjv2, GHSA-cjhx-p48c-gfm9, MINI-248w-5xcg-26h7, MINI-3xfp-28v3-fc6h, MINI-4hfm-m7xg-x8wh, MINI-63rc-2q5v-7cvq, MINI-7838-7wq3-9crc, MINI-8666-2wp6-pqmj, MINI-9cp3-mv5c-4fgw, MINI-cqx6-x296-9862, MINI-fj9f-3xpr-m8hc, MINI-jg9p-hhw3-3q83, MINI-jp6f-qv5p-75c4, MINI-r23j-3qh8-pqmq, UBUNTU-CVE-2026-109345

## What is CVE-2026-109345?

CVE-2026-109345 is a medium-severity cross-site scripting vulnerability in cure53 DOMPurify, published on 12 Oct 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

DOMPurify before 3.4.16 contains a cross-site scripting vulnerability that allows attackers to bypass sanitization because IN_PLACE mode returns a force-removed style element whose text content still carries markup. Attackers can supply a style element containing a closing style tag and an img onerror payload, which executes script when the application serializes and re-parses the returned node.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2026-109345?

2 open source packages ship an affected version, including dompurify.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `dompurify` | npm | All versions | 3.4.16 |
| `dompurify` | npm | All versions | 3.4.16 |

## How do I fix CVE-2026-109345?

Upgrade dompurify to 3.4.16 or later.

## Is CVE-2026-109345 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-109345 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-109345 and fix it if it is affected.

What it is: CVE-2026-109345 is a medium-severity cross-site scripting vulnerability in cure53 DOMPurify, published on 12 Oct 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-109345 exists.

Affected packages and fixed versions:
- dompurify (npm): affected all versions; fixed in 3.4.16
- dompurify (npm): affected all versions; fixed in 3.4.16

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-109345/ (Markdown: https://insights.sbomify.com/CVE-2026-109345/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-109345
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-109345
- OSV: https://osv.dev/vulnerability/CVE-2026-109345

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-109345/
Summaries are generated and may contain mistakes; the official description above is the record.
