Vulnerability · Published Apr 17, 2026 · Assigned by GitHub_M
CVE-2026-40301rhukster/dom-sanitizer: SVG <style> tag allows CSS injection via unfiltered url() and @import directives
Medium 4.7
In plain English
A medium-severity cross-site scripting in dom-sanitizer from rhukster. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 25% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Packagist | rhukster/dom-sanitizer | 1.0.10 | GHSA-93vf-569f-22cq |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| rhukster | dom-sanitizer | < 1.0.10 |
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N