CVE-2026-49978 — dompurify
Fix: cure53/DOMPurify@ca30f07CVE-2026-49978 is a Cross-site Scripting (XSS) vulnerability in dompurify. A fix is available for dompurify — see the affected versions and patch details below.
DOMPurify IN_PLACE Sanitization Bypass via Attached Shadow Root Inside <template>.content
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-49978.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
dompurifynpmDescription
If the HTML you give it contains a <template> element, and inside that template there's an element with a shadow DOM attached to it, DOMPurify quietly skips over the shadow contents. Whatever the attacker put in there - an image with an onerror handler, a link with a javascript: URL, even a full script - survives untouched. The moment the application uses that template the way templates are meant to be used (cloning it and inserting the result into the page), the malicious payload comes along and runs as if it had never been sanitized. From there an attacker gets everything XSS normally gets them: session cookies, stored tokens, the ability to act as the user, and the ability to leave persistent payloads behind for the next person who visits.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | dompurify | all versions | 3.4.7npm install dompurify@3.4.7 |
Affected Products
dompurifycure53Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for dompurify, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update dompurify to 3.4.7 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-49978 is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This vulnerability in DOMPurify is rated as Important as it allows for cross-site scripting (XSS) attacks. When DOMPurify performs in-place sanitization, it may fail to properly process shadow DOM content within `<template>.content`, enabling an attacker to embed and execute malicious JavaScript. This could lead to…
| Product | Fixed in | Advisory |
|---|---|---|
| Cryostat 4 on RHEL 9 | cryostat/cryostat-openshift-console-plugin-rhel9:4.2.0-14 | RHSA-2026:68333 |
| Red Hat AMQ Broker 7.13.6 | dompurify | RHSA-2026:66545 |
| Red Hat AMQ Broker 7.14.1 | dompurify | RHSA-2026:66488 |
| Red Hat build of Apicurio Registry 3.3.1 | apicurio/apicurio-registry-ui-rhel8 | RHSA-2026:59360 |
| Red Hat Data Grid 8.6.3 | dompurify | RHSA-2026:69296 |
| Red Hat Enterprise Linux 10 | rh-podman-desktop-0:1.1.2-1.el10_2 | RHSA-2026:57590 |
| Streams for Apache Kafka 3.2.1 | dompurify | RHSA-2026:54435 |
| Red Hat Advanced Cluster Security 4.9 | advanced-cluster-security/rhacs-main-rhel8:1785413210 | RHSA-2026:48872 |
Frequently Asked Questions
Is CVE-2026-49978 in your dependencies?
Find it across npm, including transitive dependencies.