A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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-2024-45293

CVE-2024-45293: PHPSpreadsheet XXE Vulnerability

CVE-2024-45293 is an XML External Entity (XXE) vulnerability in PHPSpreadsheet that allows attackers to disclose sensitive server files through crafted XLSX uploads. This article covers technical details, affected versions, impact, and mitigation.

Published: May 26, 2026

CVE-2024-45293 Overview

CVE-2024-45293 is an XML External Entity (XXE) vulnerability in PHPSpreadsheet, a pure PHP library for reading and writing spreadsheet files. The library's XLSX reader includes a security scanner intended to block XXE payloads, but attackers can bypass it by inserting whitespace around the XML encoding attribute. This bypass allows a UTF-7 encoded XXE payload to reach the parser, enabling disclosure of server files and sensitive data when an application accepts user-supplied spreadsheets. The flaw is tracked as [CWE-611] Improper Restriction of XML External Entity Reference.

Critical Impact

Remote, unauthenticated attackers can read arbitrary server files by uploading a crafted XLSX containing a UTF-7 XXE payload that evades PHPSpreadsheet's XmlScanner checks.

Affected Products

  • PHPOffice PhpSpreadsheet versions prior to 1.29.1
  • PHPOffice PhpSpreadsheet 2.x prior to 2.1.1
  • PHPOffice PhpSpreadsheet 2.2.x prior to 2.3.0

Discovery Timeline

  • 2024-10-07 - CVE-2024-45293 published to the National Vulnerability Database
  • 2025-03-07 - Last updated in NVD database

Technical Details for CVE-2024-45293

Vulnerability Analysis

The vulnerability resides in src/PhpSpreadsheet/Reader/Security/XmlScanner.php, specifically the toUtf8 function responsible for normalizing XML input prior to scanning. The function uses a regular expression to detect the declared XML encoding by searching for encoding="*" or encoding='*'. When no match is found, the scanner assumes UTF-8 and skips the conversion step that would otherwise neutralize alternate encodings.

An attacker who inserts a single whitespace character before or after the = in the encoding attribute defeats the regex. The scanner then bypasses encoding conversion, while the downstream XML parser still honors the declared encoding. This mismatch lets a UTF-7 encoded <!DOCTYPE> declaration with an external entity reference pass through unmodified.

Successful exploitation discloses local files such as /etc/passwd, application source code, or configuration secrets through standard XXE primitives. Confidentiality impact is high; the issue does not directly affect integrity or availability.

Root Cause

The root cause is a flawed encoding detection regex in XmlScanner::toUtf8 that does not tolerate the whitespace permitted by the XML specification around attribute equals signs. The detection logic is also too narrow — it fails open by defaulting to UTF-8 instead of refusing to process unrecognized declarations. This violates the defense-in-depth assumption that all input is normalized before scanning for <!ENTITY> and SYSTEM references.

Attack Vector

Exploitation requires the target application to accept user-uploaded XLSX files and parse them with PHPSpreadsheet. The attacker crafts an XLSX archive whose internal XML parts declare encoding = "UTF-7" with a whitespace-padded attribute. The XML body contains a UTF-7 encoded external entity declaration referencing a local file or attacker-controlled URL. When the server parses the spreadsheet, the entity resolves and the file contents are returned through cell data or error messages.

The vulnerability manifests in the toUtf8 encoding detection routine of XmlScanner.php. See the PHPOffice security advisory GHSA-6hwr-6v2f-3m88 for full technical details and the corrected regular expression.

Detection Methods for CVE-2024-45293

Indicators of Compromise

  • Uploaded XLSX files whose internal XML parts contain encoding declarations with surrounding whitespace, such as encoding ="UTF-7" or encoding= 'UTF-7'.
  • UTF-7 encoded substrings inside XLSX XML parts, notably +ADw- sequences that decode to <!DOCTYPE or <!ENTITY markup.
  • Outbound HTTP or DNS requests from PHP application servers immediately after spreadsheet uploads, indicating external entity resolution.
  • PHP error logs referencing libxml entity loading or unexpected file reads triggered by PHPSpreadsheet processes.

Detection Strategies

  • Inspect XLSX uploads in transit by unzipping the archive and scanning embedded XML for non-UTF-8 encoding declarations and DOCTYPE blocks.
  • Hunt in process telemetry for PHP-FPM or Apache workers reading sensitive paths such as /etc/passwd, /proc/self/environ, or application secret files shortly after a file upload.
  • Correlate web access logs of spreadsheet upload endpoints with egress connections from the same worker process within a short time window.

Monitoring Recommendations

  • Enable libxml entity loader logging in PHP and alert on any external entity resolution from web-facing workloads.
  • Monitor the installed version of phpoffice/phpspreadsheet across hosts via software inventory and flag versions below 1.29.1, 2.1.1, or 2.3.0.
  • Capture and retain uploaded XLSX samples for retroactive scanning when new XXE bypass techniques are disclosed.

How to Mitigate CVE-2024-45293

Immediate Actions Required

  • Upgrade phpoffice/phpspreadsheet to 1.29.1, 2.1.1, or 2.3.0 or later using Composer across all application environments.
  • Audit application code for any direct calls to IOFactory::load() or XLSX reader instances and confirm the patched version is loaded at runtime.
  • Restrict file upload endpoints to authenticated users and validate the MIME type and structure of submitted spreadsheets before parsing.
  • Run the PHP-FPM worker under a least-privilege account that cannot read sensitive configuration or credential files.

Patch Information

The maintainers fixed the encoding detection logic in PHPSpreadsheet releases 1.29.1, 2.1.1, and 2.3.0. The patched XmlScanner::toUtf8 regex now tolerates whitespace around the encoding attribute and correctly identifies non-UTF-8 declarations before scanning. Full details are available in the PHPOffice GitHub Security Advisory GHSA-6hwr-6v2f-3m88.

Workarounds

  • No vendor-supplied workarounds exist; upgrading is the only supported remediation per the advisory.
  • As a compensating control, disable XLSX upload functionality until the patched library is deployed.
  • Apply egress filtering on application servers to block outbound connections that XXE payloads rely on for data exfiltration.
bash
# Configuration example
composer require phpoffice/phpspreadsheet:^2.3.0
composer show phpoffice/phpspreadsheet | grep versions

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

  • Vulnerability Details
  • TypeXXE

  • Vendor/TechPhpoffice Phpspreadsheet

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability71.63%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-611
  • Vendor Resources
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-40902: PhpOffice PhpSpreadsheet DoS Vulnerability

  • CVE-2026-40863: PhpSpreadsheet XML Reader DoS Vulnerability

  • CVE-2026-40296: PhpSpreadsheet XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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