CVE-2026-65900: cure53 DOMPurify template expression bypass in DOM output modes

CVE-2026-65900 · Severity: medium · CVSS 6.1 · Published 2026-07-23

DOMPurify, a widely used library for cleaning HTML to prevent security attacks, contains a flaw when processing templates. When configured to protect against template-based attacks while returning a live document object, it fails to properly clean content inside HTML <template> tags. This could allow an attacker to bypass security filters and execute malicious scripts (Cross-Site Scripting) in applications that use template engines like Angular or Lit to render the sanitized content.

Technologies: dompurify (npm). Vendors: npm.

Quick answers

Is CVE-2026-65900 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-65900 being exploited in the wild.
How severe is CVE-2026-65900?
Medium severity, with a CVSS score of 6.1, published 23 July 2026.
Which products and versions are affected?
dompurify (npm) SEMVER:introduced=3.0.0,fixed=3.4.8.
Is there a fix for CVE-2026-65900?
Yes. dompurify (npm): upgrade to 3.4.8 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-65900 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-65900?
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.8 or later
    npm install dompurify@3.4.8

Technical details

A vulnerability exists in DOMPurify's SAFE_FOR_TEMPLATES feature when used with RETURN_DOM, RETURN_DOM_FRAGMENT, or IN_PLACE output modes. The root cause is that the _scrubTemplateExpressions function utilizes a NodeIterator and node.normalize() which do not descend into the DocumentFragment of <template>.content. An attacker can split a template expression (e.g., ${...}) across multiple adjacent text nodes using disallowed tags that are removed but whose content is kept. Because the final normalization pass ignores the template content, these split nodes are never merged and scrubbed, allowing the full expression to survive sanitization. If a downstream framework subsequently normalizes and evaluates this content, it results in arbitrary code execution. This issue is fixed in version 3.4.8.

Affected products

  • cure53 DOMPurify >=3.0.0, <3.4.8

Identifiers

  • CVE-2026-65900
  • GHSA-gvmj-g25r-r7wr

Timeline

  • 2026-05-29: advisory: GitHub Security Advisory GHSA-gvmj-g25r-r7wr published
  • 2026-07-23: disclosed: CVE-2026-65900 published to NVD

References

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