Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm
Not in CISA KEV

CVE-2026-49978 — dompurify

Fix: cure53/DOMPurify@ca30f07

CVE-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

Also known asGHSA-rp9w-3fw7-7cwq
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 24, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

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

via FIRST.org ↗
0.4%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs34th percentile — riskier than 34% of all scored CVEsHighest risk
0.00%0.30%0.60%0.90%0.3%0.3%0.4%0.4%Aug 26Oct 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected

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.

6Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
dompurifynpm
45.3Mdownloads / week

Description

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.

advisory.pdf

poc.html

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmdompurifyall versions3.4.7npm install dompurify@3.4.7

Affected Products

1 product · 1 configurations
Application
dompurifycure53
< 3.4.7
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    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.

  2. 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.

  3. 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.

Red HatImportant

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…

ProductFixed inAdvisory
Cryostat 4 on RHEL 9cryostat/cryostat-openshift-console-plugin-rhel9:4.2.0-14RHSA-2026:68333
Red Hat AMQ Broker 7.13.6dompurifyRHSA-2026:66545
Red Hat AMQ Broker 7.14.1dompurifyRHSA-2026:66488
Red Hat build of Apicurio Registry 3.3.1apicurio/apicurio-registry-ui-rhel8RHSA-2026:59360
Red Hat Data Grid 8.6.3dompurifyRHSA-2026:69296
Red Hat Enterprise Linux 10rh-podman-desktop-0:1.1.2-1.el10_2RHSA-2026:57590
Streams for Apache Kafka 3.2.1dompurifyRHSA-2026:54435
Red Hat Advanced Cluster Security 4.9advanced-cluster-security/rhacs-main-rhel8:1785413210RHSA-2026:48872

Frequently Asked Questions

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 t
O3 Security · Impact-Aware SCA

Is CVE-2026-49978 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2026-49978: dompurify XSS — Fixed in 3.4.7