Description
DOMPurify from 3.4.4 before 3.4.17 contains a SAFE_FOR_TEMPLATES bypass that lets attackers preserve template expressions in attached shadow roots when using RETURN_DOM, RETURN_DOM_FRAGMENT, or IN_PLACE modes. Attackers can split expressions across text nodes separated by disallowed elements, which merge after removal and are evaluated by downstream template engines for cross-site scripting.
Published: 2026-10-26
Score: 5.1 Medium
EPSS: n/a
KEV: No
Impact: Cross‑Site Scripting
Action: Apply Patch
AI Analysis

Impact

The vulnerability allows an attacker to exploit DOMPurify’s SAFE_FOR_TEMPLATES bypass when content is inserted into a shadow root using certain modes. By fragmenting a template expression across multiple text nodes separated by elements that are removed during sanitization, the expression is reassembled, is then evaluated by downstream template engines, and can lead to cross‑site scripting. This is a typical client‑side rendering flaw, classified as a cross‑site scripting weakness (CWE‑79).

Affected Systems

This issue affects the cure53:DOMPurify library for all releases from 3.4.4 up to but not including 3.4.17. Applications that incorporate DOMPurify in these versions are vulnerable.

Risk and Exploitability

With a CVSS score of 5.1 the vulnerability is considered moderate. The EPSS score is not available, and it is not listed in CISA’s KEV catalog. The likely attack vector is that an attacker provides user‑supplied content that is wrapped in a shadow root and processed with the vulnerable modes. If this input reaches the rendering engine, the attacker can achieve arbitrary JavaScript execution in the context of the page.

Generated by OpenCVE AI on October 27, 2026 at 07:02 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to DOMPurify version 3.4.17 or newer
  • Reconfigure the library to disable SAFE_FOR_TEMPLATES or avoid using shadow roots in sensitive contexts until the patch is applied
  • Sanitize or escape template expressions before they are added to the DOM to prevent merging across text nodes

Generated by OpenCVE AI on October 27, 2026 at 07:02 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 27 Oct 2026 04:30:00 +0000

Type Values Removed Values Added
Description DOMPurify from 3.4.4 before 3.4.17 contains a SAFE_FOR_TEMPLATES bypass that lets attackers preserve template expressions in attached shadow roots when using RETURN_DOM, RETURN_DOM_FRAGMENT, or IN_PLACE modes. Attackers can split expressions across text nodes separated by disallowed elements, which merge after removal and are evaluated by downstream template engines for cross-site scripting.
Title DOMPurify from 3.4.4 before 3.4.17 SAFE_FOR_TEMPLATES Bypass via Shadow Root Content
First Time appeared Cure53
Cure53 dompurify
Weaknesses CWE-79
CPEs cpe:2.3:a:cure53:dompurify:*:*:*:*:*:*:*:*
Vendors & Products Cure53
Cure53 dompurify
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

cvssV4_0

{'score': 5.1, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N'}


Subscriptions

Cure53 Dompurify
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-10-26T23:05:35.850Z

Reserved: 2026-10-26T22:13:13.606Z

Link: CVE-2026-116804

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-27T00:17:12.193

Modified: 2026-10-27T00:17:12.193

Link: CVE-2026-116804

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-27T07:30:15Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')