CVE-2026-40301 Details
Description
DOMSanitizer is a DOM/SVG/MathML Sanitizer for PHP 7.3+. Prior to version 1.0.10, DOMSanitizer::sanitize() allows <style> elements in SVG content but never inspects their text content. CSS url() references and @import rules pass through unfiltered, causing the browser to issue HTTP requests to attacker-controlled hosts when the sanitized SVG is rendered. Version 1.0.10 fixes the issue.
A CSS injection vulnerability has been identified in DOMSanitizer, a library for sanitizing DOM, SVG, and MathML content in PHP 7.3 and later. Prior to version 1.0.10, the 'sanitize' method allowed 'style' elements in SVG content but failed to inspect their text. This oversight permitted CSS 'url()' references and '@import' rules to pass through unfiltered. When the sanitized SVG is rendered, it can trigger HTTP requests to attacker-controlled hosts. The vulnerability arises because the 'style' tag is included in the allowed SVG elements, yet its content is not properly sanitized, allowing external resource requests.
Users can update to DOMSanitizer version 1.0.10 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.
Volerion
Assessed Apr 17, 2026CISA-ADP
Assessed Apr 20, 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/rhukster/dom-sanitizer/commit/49a98046b708a4c92f754f5b0ef1720bb85142e2 | [email protected] | Source CodeVendor |
| https://github.com/rhukster/dom-sanitizer/releases/tag/1.0.10 | [email protected] | Release NotesVendor |
| https://github.com/rhukster/dom-sanitizer/security/advisories/GHSA-93vf-569f-22cq | [email protected] | AdvisoryExploitRemedyVendor |
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 |
|---|---|
| rhukster/dom-sanitizer | All versions |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 17, 2026 | New CVE Received | [email protected] |
Volerion