CVE-2026-49978: Cure53 DOMPurify XSS bypass in IN_PLACE sanitization

CVE-2026-49978 · Severity: medium · CVSS 4 · Published 2026-07-14

DOMPurify is a security library used by web applications to clean user-provided content and prevent malicious scripts from running. A flaw in how the library handles specific HTML template elements allows attackers to bypass security filters and execute unauthorized JavaScript in a user's browser. This could lead to account takeover, theft of sensitive session data, or unauthorized actions performed on behalf of the user.

Technologies: dompurify (npm). Vendors: npm.

Quick answers

Is CVE-2026-49978 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-49978 being exploited in the wild.
How severe is CVE-2026-49978?
Medium severity, with a CVSS score of 4, published 14 July 2026.
Which products and versions are affected?
dompurify (npm) <= 3.4.6, SEMVER:introduced=0,fixed=3.4.7.
Is there a fix for CVE-2026-49978?
Yes. dompurify (npm): upgrade to 3.4.7 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-49978 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-49978?
Check whether you run dompurify (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • dompurify (npm): upgrade to 3.4.7 or later
    npm install dompurify@3.4.7

Technical details

A Cross-Site Scripting (XSS) vulnerability exists in DOMPurify when using the IN_PLACE sanitization mode. The sanitizer fails to inspect shadow contents attached to elements located inside <template>.content fragments. An attacker can craft malicious markup containing event handlers or JavaScript URLs within these shadow roots that survive the sanitization process. When the application subsequently clones and inserts the sanitized template into the DOM, the malicious payload executes. This issue is resolved in version 3.4.7 by hardening the handling of Shadow Roots during IN_PLACE operations.

Affected products

  • cure53 DOMPurify < 3.4.7

Identifiers

  • CVE-2026-49978
  • GHSA-rp9w-3fw7-7cwq

Timeline

  • 2026-05-27: patched: Version 3.4.7 released
  • 2026-05-27: advisory: GitHub Security Advisory GHSA-rp9w-3fw7-7cwq published
  • 2026-07-14: disclosed: CVE-2026-49978 published to NVD

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.