The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-40301

CVE-2026-40301: DOMSanitizer XSS Vulnerability

CVE-2026-40301 is a cross-site scripting vulnerability in DOMSanitizer that allows malicious CSS content in SVG elements to pass through unfiltered. This article covers the technical details, affected versions, and mitigation.

Published: April 23, 2026

CVE-2026-40301 Overview

DOMSanitizer is a DOM/SVG/MathML Sanitizer library for PHP 7.3 and later versions. Prior to version 1.0.10, the DOMSanitizer::sanitize() function allows <style> elements within SVG content but fails to inspect their text content. This oversight permits CSS url() references and @import rules to pass through the sanitizer unfiltered. When the sanitized SVG is rendered in a browser, these malicious CSS directives cause the browser to issue HTTP requests to attacker-controlled hosts, enabling information disclosure attacks.

Critical Impact

Attackers can embed malicious CSS within SVG content to exfiltrate user information or track user activity through unauthorized HTTP requests to external servers when sanitized SVG files are rendered.

Affected Products

  • DOMSanitizer for PHP 7.3+ versions prior to 1.0.10
  • Applications using vulnerable DOMSanitizer versions to process SVG content
  • Web applications rendering user-supplied SVG files through DOMSanitizer

Discovery Timeline

  • 2026-04-17 - CVE CVE-2026-40301 published to NVD
  • 2026-04-20 - Last updated in NVD database

Technical Details for CVE-2026-40301

Vulnerability Analysis

This vulnerability is classified as Cross-Site Scripting (CWE-79) due to the improper neutralization of input during web page generation. The core issue lies in the incomplete sanitization logic within DOMSanitizer. While the library correctly handles many dangerous elements and attributes in SVG content, it overlooks the potential for malicious content within <style> element text nodes.

The sanitizer allows <style> elements to pass through when processing SVG files, which is necessary for legitimate SVG styling. However, it does not parse or filter the CSS content within these elements. This creates a gap where attackers can craft SVG files containing CSS directives that reference external resources.

When a browser renders the sanitized SVG, it processes the embedded CSS, which can include url() functions pointing to attacker-controlled servers or @import rules that fetch external stylesheets. These requests leak information such as the user's IP address, user agent, and potentially session identifiers through URL parameters.

Root Cause

The root cause is the failure of DOMSanitizer::sanitize() to recursively inspect and filter the text content within <style> elements during SVG processing. The sanitization logic focuses on element structure and attributes but treats text nodes within style elements as safe content that doesn't require filtering.

Attack Vector

An attacker can exploit this vulnerability by crafting a malicious SVG file that contains CSS with external resource references. When this SVG is uploaded to an application using the vulnerable DOMSanitizer library and subsequently rendered to users, the embedded CSS triggers outbound HTTP requests.

The attack scenario involves:

  1. An attacker creates an SVG file with a <style> element containing CSS url() or @import directives pointing to their server
  2. The SVG is processed by an application using vulnerable DOMSanitizer versions
  3. The malicious CSS passes through sanitization unchanged
  4. When victims view the rendered SVG, their browsers make requests to the attacker's server
  5. The attacker captures information from these requests for tracking or reconnaissance

This attack requires network access and user interaction (the victim must view the rendered SVG), but no privileges are required on the target system. The vulnerability enables cross-origin information disclosure through CSS-based exfiltration techniques.

Detection Methods for CVE-2026-40301

Indicators of Compromise

  • SVG files containing <style> elements with url() functions referencing external domains
  • CSS @import rules within SVG style elements pointing to suspicious URLs
  • Outbound HTTP requests originating from rendered SVG content to unknown external hosts
  • Unexpected network traffic patterns when users view SVG images

Detection Strategies

  • Implement content security policies (CSP) that restrict external resource loading from SVG content
  • Monitor web application logs for uploaded SVG files containing style elements with external references
  • Deploy network monitoring to detect anomalous outbound requests triggered by rendered web content
  • Perform static analysis of uploaded SVG files to identify CSS directives with external URL references

Monitoring Recommendations

  • Configure web application firewalls to inspect SVG uploads for suspicious CSS patterns
  • Enable detailed logging for SVG file processing operations
  • Monitor DNS queries for unusual patterns that may indicate CSS-based data exfiltration
  • Implement alerting for outbound connections initiated by browser rendering of user-uploaded content

How to Mitigate CVE-2026-40301

Immediate Actions Required

  • Upgrade DOMSanitizer to version 1.0.10 or later immediately
  • Audit existing sanitized SVG content in your application for malicious CSS directives
  • Implement Content Security Policy headers to restrict external resource loading
  • Review and sanitize any cached SVG files that were processed with vulnerable versions

Patch Information

The vulnerability has been addressed in DOMSanitizer version 1.0.10. The fix is available through the GitHub Release for Version 1.0.10. Technical details of the fix can be reviewed in the commit 49a98046b708a4c92f754f5b0ef1720bb85142e2. Additional information is available in the GitHub Security Advisory GHSA-93vf-569f-22cq.

Workarounds

  • Strip all <style> elements from SVG content before or after sanitization as a temporary measure
  • Implement additional CSS content filtering to remove url() and @import directives
  • Serve user-uploaded SVG files with restrictive CSP headers that prevent external resource loading
  • Consider converting SVG files to raster formats (PNG, JPEG) when rendering user-uploaded content is required
bash
# Update DOMSanitizer via Composer
composer require rhukster/dom-sanitizer:^1.0.10

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechDomsanitizer

  • SeverityMEDIUM

  • CVSS Score4.7

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • GitHub Commit Update

  • GitHub Release Version 1.0.10

  • GitHub Security Advisory GHSA-93vf-569f-22cq
  • Latest CVEs
  • CVE-2025-52479: HTTP.jl & URIs.jl CRLF Injection Flaw

  • CVE-2026-31740: Linux Kernel Race Condition Vulnerability

  • CVE-2026-31743: Linux Kernel Buffer Overflow Vulnerability

  • CVE-2026-31744: Linux Kernel NULL Pointer Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English