CVE-2026-40301: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in rhukster dom-sanitizer
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.
AI Analysis
Technical Summary
The rhukster dom-sanitizer library for PHP versions prior to 1.0.10 contains a cross-site scripting (CWE-79) vulnerability. Specifically, the sanitize() method permits <style> elements within SVG content without inspecting the CSS text inside them. As a result, CSS constructs such as url() references and @import rules are not filtered, enabling an attacker to cause the browser to issue HTTP requests to attacker-controlled domains when the sanitized SVG is rendered. This behavior can lead to information leakage or other side effects related to cross-origin requests. The issue is resolved in version 1.0.10 of the library.
Potential Impact
The vulnerability allows an attacker to embed malicious CSS within SVG content that is sanitized by vulnerable versions of dom-sanitizer. When the sanitized SVG is rendered in a browser, it can trigger HTTP requests to attacker-controlled servers via CSS url() or @import rules. This can lead to information disclosure such as leaking user browsing context or enabling tracking. The CVSS score of 4.7 reflects a medium severity with low confidentiality impact and no integrity or availability impact.
Mitigation Recommendations
Upgrade to dom-sanitizer version 1.0.10 or later, where the sanitize() method properly inspects and filters CSS content inside <style> elements in SVG. Since the vendor advisory indicates the issue is fixed in version 1.0.10, applying this official fix is the recommended remediation. No other mitigations are specified or required.
CVE-2026-40301: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in rhukster dom-sanitizer
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.
CVSS v3.1
Score 4.7medium
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The rhukster dom-sanitizer library for PHP versions prior to 1.0.10 contains a cross-site scripting (CWE-79) vulnerability. Specifically, the sanitize() method permits <style> elements within SVG content without inspecting the CSS text inside them. As a result, CSS constructs such as url() references and @import rules are not filtered, enabling an attacker to cause the browser to issue HTTP requests to attacker-controlled domains when the sanitized SVG is rendered. This behavior can lead to information leakage or other side effects related to cross-origin requests. The issue is resolved in version 1.0.10 of the library.
Potential Impact
The vulnerability allows an attacker to embed malicious CSS within SVG content that is sanitized by vulnerable versions of dom-sanitizer. When the sanitized SVG is rendered in a browser, it can trigger HTTP requests to attacker-controlled servers via CSS url() or @import rules. This can lead to information disclosure such as leaking user browsing context or enabling tracking. The CVSS score of 4.7 reflects a medium severity with low confidentiality impact and no integrity or availability impact.
Mitigation Recommendations
Upgrade to dom-sanitizer version 1.0.10 or later, where the sanitize() method properly inspects and filters CSS content inside <style> elements in SVG. Since the vendor advisory indicates the issue is fixed in version 1.0.10, applying this official fix is the recommended remediation. No other mitigations are specified or required.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-10T20:22:44.036Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69e2a136bdfbbecc59908362
Added to database: 4/17/2026, 9:08:06 PM
Last enriched: 4/25/2026, 2:56:11 AM
Last updated: 6/3/2026, 3:54:33 PM
Views: 67
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.