CVE-2026-49978 Details
Description
DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Prior to 3.4.7, DOMPurify IN_PLACE sanitization could skip shadow contents attached to an element inside <template>.content, allowing attacker-controlled markup such as event handlers, JavaScript URLs, or scripts to survive and execute when an application cloned and inserted the sanitized template. This issue is fixed in version 3.4.7.
A vulnerability exists in DOMPurify versions prior to 3.4.7, allowing for a bypass of the XSS sanitization process. When using the IN_PLACE sanitization option, the library can overlook shadow DOM contents attached to elements within <template>.content. This oversight enables attacker-controlled markup, such as event handlers, JavaScript URLs, or scripts, to remain intact and execute when the sanitized template is cloned and inserted into the document. The issue arises because DOMPurify's default behavior does not traverse shadow roots in template elements, leaving potential malicious payloads unaddressed.
Users can upgrade to DOMPurify version 3.4.7 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 21, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/cure53/DOMPurify/security/advisories/GHSA-rp9w-3fw7-7cwq | CISA-ADP | Vendor AdvisoryExploit |
| https://github.com/cure53/DOMPurify/commit/ca30f070c360df162a3e3848e80e6fd3c9e74bff | [email protected] | Patch |
| https://github.com/cure53/DOMPurify/releases/tag/3.4.7 | [email protected] | Release Notes |
| https://github.com/cure53/DOMPurify/security/advisories/GHSA-rp9w-3fw7-7cwq | [email protected] | Vendor AdvisoryExploit |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| cure53 dompurify | < 3.4.7 |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 21, 2026 | Initial Analysis | [email protected] |
| Jul 21, 2026 | CVE Modified | CISA-ADP |
| Jul 14, 2026 | New CVE Received | [email protected] |