# CVE-2026-49458: DOMPurify: Cross-realm IN_PLACE sanitization leaves executable markup intact via realm-bound `instanceof` checks

> DOMPurify fails to sanitize cross-realm DOM nodes in IN_PLACE mode, allowing attackers to inject executable markup and achieve cross-site scripting.

- **Severity:** Medium 6.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A: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:** 14 Jul 2026
- **Updated:** 15 Jul 2026
- **Also known as:** CLSA-2026-1785554485, DEBIAN-CVE-2026-49458, ECHO-620b-e534-5a35, GHSA-hpcv-96wg-7vj8, MINI-235q-85gv-mr4w, MINI-2864-2v5x-73q4, MINI-2f48-gvfw-hh9q, MINI-2pm6-76hh-8pg5, MINI-2rjf-8pc6-8737, MINI-343x-c7hg-9pf2, MINI-48gr-5wc3-jvg5, MINI-57x8-hhv8-4v3c, MINI-879g-w6c3-33w4, MINI-gmq6-57fx-rwgf, MINI-hgw4-h8ff-vj8j, MINI-hhm8-9f99-p9c2, MINI-j57v-ggv3-c5f2, MINI-jp23-hf32-pc27, MINI-q8fh-6r6x-m42v, MINI-r6w8-85fw-83qv, MINI-rj26-q4jj-rpw3, ROOT-APP-NPM-CVE-2026-49458, UBUNTU-CVE-2026-49458

## What is CVE-2026-49458?

CVE-2026-49458 is a medium-severity cross-site scripting vulnerability in cure53 DOMPurify, published on 14 Jul 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 is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Prior to 3.4.6, DOMPurify.sanitize(node, { IN_PLACE: true }) accepted same-origin foreign-realm DOM nodes while follow-on checks used parent-realm constructors, causing instanceof checks for forms, named node maps, document fragments, and elements to fail and skip clobber, template-content, and shadow-DOM sanitization branches so executable markup could survive. This issue is fixed in version 3.4.6.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation), CWE-693 (Protection Mechanism Failure), CWE-501 (Trust Boundary Violation)

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

2 open source packages ship an affected version, including dompurify. It affects 1 product.


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

Products: Cure53 Dompurify.

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

Upgrade dompurify to 3.4.6 or later.

## Is CVE-2026-49458 being exploited?

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

## Other vulnerabilities in cure53 DOMPurify

- [CVE-2024-47875](https://insights.sbomify.com/CVE-2024-47875/): DOMPurify nesting-based mXSS (critical 10.0)
- [CVE-2024-48910](https://insights.sbomify.com/CVE-2024-48910/): DOMPurify vulnerable to tampering by prototype polution (critical 9.1)
- [CVE-2026-47423](https://insights.sbomify.com/CVE-2026-47423/): DOMPurify XSS via `selectedcontent` re-clone (high 8.2)
- [CVE-2024-45801](https://insights.sbomify.com/CVE-2024-45801/): Tampering by prototype polution in DOMPurify (high 7.3)
- [CVE-2026-49978](https://insights.sbomify.com/CVE-2026-49978/): DOMPurify IN_PLACE Sanitization Bypass via Attached Shadow Root Inside <template>.content (medium 6.3)

## Fix prompt for AI coding agents

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

What it is: CVE-2026-49458 is a medium-severity cross-site scripting vulnerability in cure53 DOMPurify, published on 14 Jul 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-49458 exists.

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

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-49458/ (Markdown: https://insights.sbomify.com/CVE-2026-49458/index.md)
```

## Sources

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

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