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-2025-23210

CVE-2025-23210: PHPSpreadsheet XSS Sanitizer Bypass Flaw

CVE-2025-23210 is a cross-site scripting sanitizer bypass in PHPSpreadsheet that exploits the javascript protocol with special characters. This article covers technical details, affected versions, and mitigation steps.

Updated: January 22, 2026

CVE-2025-23210 Overview

CVE-2025-23210 is a Cross-Site Scripting (XSS) sanitizer bypass vulnerability in phpoffice/phpspreadsheet, a pure PHP library for reading and writing spreadsheet files. Attackers can bypass the XSS sanitizer by exploiting the javascript protocol combined with special characters, potentially allowing malicious script execution when users interact with crafted spreadsheet files.

Critical Impact

Successful exploitation allows attackers to inject malicious JavaScript code that bypasses existing XSS protections, potentially leading to session hijacking, credential theft, or unauthorized actions on behalf of legitimate users.

Affected Products

  • PHPOffice PhpSpreadsheet versions prior to 1.29.9
  • PHPOffice PhpSpreadsheet versions prior to 2.1.8
  • PHPOffice PhpSpreadsheet versions prior to 2.3.7
  • PHPOffice PhpSpreadsheet versions prior to 3.9.0

Discovery Timeline

  • 2025-02-03 - CVE CVE-2025-23210 published to NVD
  • 2025-02-03 - Last updated in NVD database

Technical Details for CVE-2025-23210

Vulnerability Analysis

This vulnerability stems from an incomplete XSS sanitization implementation in PHPOffice PhpSpreadsheet. The library's URL validation and hyperlink processing logic failed to properly handle certain special characters (specifically control characters in the \\x00-\\x1f range) when combined with the javascript: protocol scheme. This weakness allowed attackers to craft malicious URLs that could evade the existing XSS filters while still being interpreted as executable JavaScript by web browsers when the spreadsheet content was rendered as HTML.

The vulnerability affects two key components: the Drawing.php file which handles linked drawing validation, and the Html.php writer which processes hyperlinks for HTML output. Both components shared similar pattern matching logic that could be bypassed using whitespace and control characters within the protocol scheme.

Root Cause

The root cause is an insufficient regular expression pattern used to validate URL protocol schemes. The original implementation used the pattern /^([\w\s]+):/u to extract and validate URL schemes, which only matched word characters and standard whitespace. This allowed attackers to insert control characters (ASCII 0x00-0x1F) within the protocol name, effectively creating a scheme like java[control-char]script: that bypassed the blocklist check but was still interpreted as javascript: by browsers after HTML entity decoding.

Attack Vector

The attack is network-accessible and requires user interaction. An attacker would craft a malicious spreadsheet file containing hyperlinks with obfuscated javascript: URLs using control characters. When a victim opens this file using an application that processes it with PhpSpreadsheet and renders the output as HTML, the malicious JavaScript executes in the victim's browser context. The attack requires the attacker to have some level of access to create or modify spreadsheet content that will be processed by the target system.

The following patches address the vulnerability by extending the regex pattern to also match control characters:

Patch for Drawing.php:

php
 
         $this->path = '';
         // Check if a URL has been passed. https://stackoverflow.com/a/2058596/1252979
-        if (filter_var($path, FILTER_VALIDATE_URL)) {
+        if (filter_var($path, FILTER_VALIDATE_URL) || (preg_match('/^([\\w\\s\\\x00-\\\x1f]+):/u', $path) && !preg_match('/^([\\w]+):/u', $path))) {
             if (!preg_match('/^(http|https|file|ftp|s3):/', $path)) {
                 throw new PhpSpreadsheetException('Invalid protocol for linked drawing');
             }

Source: GitHub Commit

Patch for Html.php:

php
                 $url = $worksheet->getHyperlink($coordinate)->getUrl();
                 $urlDecode1 = html_entity_decode($url, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
                 $urlTrim = Preg::replace('/^\\s+/u', '', $urlDecode1);
-                $parseScheme = Preg::isMatch('/^([\\w\\s]+):/u', strtolower($urlTrim), $matches);
+                $parseScheme = Preg::isMatch('/^([\\w\\s\\\x00-\\\x1f]+):/u', strtolower($urlTrim), $matches);
                 if ($parseScheme && !in_array($matches[1], ['http', 'https', 'file', 'ftp', 'mailto', 's3'], true)) {
                     $cellData = htmlspecialchars($url, Settings::htmlEntityFlags());
+                    $cellData = self::replaceControlChars($cellData);
                 } else {
                     $tooltip = $worksheet->getHyperlink($coordinate)->getTooltip();
                     $tooltipOut = empty($tooltip) ? '' : (' title="' . htmlspecialchars($tooltip) . '"');

Source: GitHub Commit

Detection Methods for CVE-2025-23210

Indicators of Compromise

  • Spreadsheet files containing hyperlinks with unusual character sequences or control characters in URL schemes
  • HTTP requests containing encoded control characters (e.g., %00-%1f) adjacent to protocol schemes like javascript
  • Server logs showing processing of spreadsheet files followed by suspicious client-side script execution attempts
  • Unusual JavaScript execution patterns in web applications that render PhpSpreadsheet-generated HTML

Detection Strategies

  • Implement Web Application Firewall (WAF) rules to detect URLs containing control characters combined with javascript: protocol patterns
  • Monitor application logs for errors or warnings from PhpSpreadsheet related to URL validation failures
  • Use Content Security Policy (CSP) headers to restrict inline script execution and report violations
  • Deploy endpoint detection to identify exploitation attempts targeting spreadsheet processing functionality

Monitoring Recommendations

  • Enable verbose logging for PhpSpreadsheet operations in production environments
  • Set up alerts for CSP violation reports indicating inline JavaScript execution attempts
  • Monitor file upload endpoints for suspicious spreadsheet files with obfuscated hyperlinks
  • Track PhpSpreadsheet library versions across your environment to ensure compliance with patched versions

How to Mitigate CVE-2025-23210

Immediate Actions Required

  • Upgrade PHPOffice PhpSpreadsheet to version 1.29.9, 2.1.8, 2.3.7, or 3.9.0 or later immediately
  • Audit any spreadsheet files from untrusted sources that may have been processed prior to patching
  • Implement Content Security Policy headers to mitigate potential XSS impact
  • Review and restrict which users can upload or create spreadsheet content processed by your application

Patch Information

The PHPOffice team has released security patches in versions 3.9.0, 2.3.7, 2.1.8, and 1.29.9. The fix modifies the URL scheme validation regex to include control characters (\\x00-\\x1f) in the pattern matching, preventing bypass attempts. Additionally, the HTML writer now explicitly replaces control characters in cell data to neutralize malicious payloads. Users should update their composer.json dependency to require the patched version.

For more details, see the GitHub Security Advisory.

Workarounds

  • No official workarounds are available for this vulnerability
  • Users are strongly advised to upgrade to a patched version as the only remediation option
  • As a defense-in-depth measure, implement strict Content Security Policy headers to limit JavaScript execution
  • Consider input validation on any spreadsheet content before processing with PhpSpreadsheet
bash
# Update PhpSpreadsheet via Composer
composer require phpoffice/phpspreadsheet:^3.9.0
# Or for older major versions:
# composer require phpoffice/phpspreadsheet:^2.3.7
# composer require phpoffice/phpspreadsheet:^2.1.8
# composer require phpoffice/phpspreadsheet:^1.29.9

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

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechPhpoffice

  • SeverityMEDIUM

  • CVSS Score4.8

  • EPSS Probability0.29%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • GitHub Commit Change

  • GitHub Security Advisory
  • Latest CVEs
  • CVE-2026-40322: SiYuan Knowledge Management RCE Vulnerability

  • CVE-2026-40318: SiYuan Path Traversal Vulnerability

  • CVE-2026-40259: SiYuan Auth Bypass Vulnerability

  • CVE-2026-40255: AdonisJS HTTP Server CSRF 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