DOMPurify IN_PLACE Sanitization Bypass via Attached Shadow Root Inside <template>.content
Description
If the HTML you give it contains a 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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
dompurifynpm | < 3.4.7 | 3.4.7 |
Affected products
31- osv-coords30 versionspkg:apk/chainguard/kibana-9.4pkg:apk/chainguard/kibana-9.4-iamguardedpkg:apk/chainguard/langfuse-3-workerpkg:apk/chainguard/langfuse-fips-3-workerpkg:apk/chainguard/librechatpkg:apk/chainguard/nextcloud-server-32pkg:apk/chainguard/nextcloud-server-33pkg:apk/chainguard/nextcloud-server-34pkg:apk/chainguard/wazuh-dashboardpkg:apk/chainguard/wazuh-dashboard-alerting-dashboards-pluginpkg:apk/chainguard/wazuh-dashboard-alerting-dashboards-plugin-fipspkg:apk/chainguard/wazuh-dashboard-anomaly-detection-dashboards-pluginpkg:apk/chainguard/wazuh-dashboard-anomaly-detection-dashboards-plugin-fipspkg:apk/chainguard/wazuh-dashboard-dashboards-mapspkg:apk/chainguard/wazuh-dashboard-dashboards-maps-fipspkg:apk/chainguard/wazuh-dashboard-dashboards-notificationspkg:apk/chainguard/wazuh-dashboard-dashboards-notifications-fipspkg:apk/chainguard/wazuh-dashboard-dashboards-reportingpkg:apk/chainguard/wazuh-dashboard-dashboards-reporting-fipspkg:apk/chainguard/wazuh-dashboard-dashboards-visualizationspkg:apk/chainguard/wazuh-dashboard-dashboards-visualizations-fipspkg:apk/chainguard/wazuh-dashboard-fipspkg:apk/chainguard/wazuh-dashboard-index-management-dashboards-pluginpkg:apk/chainguard/wazuh-dashboard-index-management-dashboards-plugin-fipspkg:apk/chainguard/wazuh-dashboard-pluginspkg:apk/chainguard/wazuh-dashboard-plugins-fipspkg:apk/wolfi/langfuse-3-workerpkg:apk/wolfi/nextcloud-server-32pkg:apk/wolfi/nextcloud-server-33pkg:npm/dompurify
< 9.4.2-r6+ 29 more
- (no CPE)range: < 9.4.2-r6
- (no CPE)range: < 9.4.2-r6
- (no CPE)range: < 3.191.0-r0
- (no CPE)range: < 3.192.0-r0
- (no CPE)range: < 0.8.7-r1
- (no CPE)range: < 32.0.12-r0
- (no CPE)range: < 33.0.6-r0
- (no CPE)range: < 34.0.1-r4
- (no CPE)range: < 4.14.5-r7
- (no CPE)range: < 4.14.5-r7
- (no CPE)range: < 4.14.5-r7
- (no CPE)range: < 4.14.5-r7
- (no CPE)range: < 4.14.5-r7
- (no CPE)range: < 4.14.5-r7
- (no CPE)range: < 4.14.5-r7
- (no CPE)range: < 4.14.5-r7
- (no CPE)range: < 4.14.5-r7
- (no CPE)range: < 4.14.5-r7
- (no CPE)range: < 4.14.5-r7
- (no CPE)range: < 4.14.5-r7
- (no CPE)range: < 4.14.5-r7
- (no CPE)range: < 4.14.5-r7
- (no CPE)range: < 4.14.5-r7
- (no CPE)range: < 4.14.5-r7
- (no CPE)range: < 4.14.5-r7
- (no CPE)range: < 4.14.5-r7
- (no CPE)range: < 3.191.0-r0
- (no CPE)range: < 32.0.12-r0
- (no CPE)range: < 33.0.6-r0
- (no CPE)range: < 3.4.7
Patches
Vulnerability mechanics
References
2News mentions
0No linked articles in our index yet.