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-2026-40902

CVE-2026-40902: PhpOffice PhpSpreadsheet DoS Vulnerability

CVE-2026-40902 is a denial of service vulnerability in PhpOffice PhpSpreadsheet that allows attackers to exhaust CPU resources via crafted XLSX files. This article covers technical details, affected versions, and patches.

Published: May 17, 2026

CVE-2026-40902 Overview

CVE-2026-40902 is a resource exhaustion vulnerability in PhpSpreadsheet, a pure PHP library for reading and writing spreadsheet files. The flaw exists in the ColumnAndRowAttributes::readRowAttributes() method of the XLSX reader. The method reads row numbers from XML attributes without validating them against the spreadsheet maximum row limit defined by AddressRange::MAX_ROW (1,048,576). An attacker can craft a minimal XLSX file of approximately 1.6KB that triggers nearly one billion loop iterations during row processing. The issue is classified under CWE-770 (Allocation of Resources Without Limits or Throttling).

Critical Impact

A single malicious 1.6KB XLSX upload can exhaust CPU resources on any web application that parses untrusted spreadsheets using PhpSpreadsheet, resulting in denial of service.

Affected Products

  • PHPOffice PhpSpreadsheet versions prior to 1.30.4
  • PHPOffice PhpSpreadsheet versions 2.0.0 through 2.1.15 and 2.2.0 through 2.4.4
  • PHPOffice PhpSpreadsheet versions 3.0.0 through 3.10.4 and 4.0.0 through 5.6.x

Discovery Timeline

  • 2026-05-12 - CVE-2026-40902 published to NVD
  • 2026-05-14 - Last updated in NVD database

Technical Details for CVE-2026-40902

Vulnerability Analysis

The vulnerability resides in PhpSpreadsheet's XLSX reader logic. When parsing an XLSX archive, the library iterates through <row> elements inside the sheet XML and extracts the r attribute to determine the row index. The ColumnAndRowAttributes::readRowAttributes() method accepts this attribute value directly and uses it to update the internal cachedHighestRow property. No bounds check is applied to ensure the value remains within the legitimate spreadsheet range of 1,048,576 rows.

Downstream operations that iterate over the worksheet, such as getHighestRow(), toArray(), and similar bulk-processing functions, then attempt to loop from row 1 up to the inflated cachedHighestRow value. An attacker-supplied value of 999,999,999 forces roughly one billion iterations on a single worksheet, consuming CPU until the PHP execution limit terminates the worker process.

Root Cause

The root cause is missing input validation on user-controlled XML data. The XLSX format is a ZIP container of XML files, and the row index attribute is fully attacker-controlled. PhpSpreadsheet trusts this value without comparing it against AddressRange::MAX_ROW. The result is an algorithmic complexity attack where a tiny input expands into a long-running server-side loop.

Attack Vector

Exploitation requires no authentication and no user interaction beyond the application accepting an XLSX upload or import. Any web application that passes an attacker-supplied XLSX file to PhpSpreadsheet's reader is vulnerable. The attacker crafts a minimal workbook containing a single forged <row r="999999999"/> element and submits it through any feature that triggers spreadsheet parsing. Repeated submissions amplify the impact and can saturate worker pools.

For technical details on the patched code path, refer to the PHPOffice PhpSpreadsheet Security Advisory GHSA-7c6m-4442-2x6m.

Detection Methods for CVE-2026-40902

Indicators of Compromise

  • XLSX uploads containing <row> elements with r attribute values greater than 1,048,576 inside xl/worksheets/sheet*.xml.
  • PHP-FPM or web worker processes hitting max_execution_time while processing user-submitted spreadsheets.
  • Sustained high CPU utilization on application servers correlated with file upload endpoints that invoke PhpSpreadsheet.

Detection Strategies

  • Inspect inbound XLSX files at the application layer and parse the sheet XML to flag any r attribute exceeding 1048576 before invoking PhpSpreadsheet.
  • Add application logging around PhpSpreadsheet reader calls capturing file size, parse duration, and the resulting getHighestRow() value to surface anomalous values.
  • Hunt application logs for PHP fatal errors of type Maximum execution time of N seconds exceeded originating from PhpSpreadsheet stack frames.

Monitoring Recommendations

  • Alert on web workers that exceed CPU thresholds while handling spreadsheet import routes.
  • Track the ratio of upload size to processing time. A sub-2KB file consuming multiple seconds of CPU is a strong signal.
  • Monitor PHP error logs and APM traces for repeated timeouts on the same endpoint from the same source IP.

How to Mitigate CVE-2026-40902

Immediate Actions Required

  • Upgrade PhpSpreadsheet to 1.30.4, 2.1.16, 2.4.5, 3.10.5, or 5.7.0 depending on the major version branch in use.
  • Inventory all PHP applications that ingest user-supplied spreadsheets and confirm the deployed PhpSpreadsheet version through composer.lock.
  • Restrict spreadsheet upload endpoints to authenticated users where the business workflow permits.

Patch Information

Maintainers fixed the issue in PhpSpreadsheet versions 1.30.4, 2.1.16, 2.4.5, 3.10.5, and 5.7.0. The patch validates row index values against AddressRange::MAX_ROW inside ColumnAndRowAttributes::readRowAttributes() and rejects or clamps out-of-range values. Update via Composer with composer require phpoffice/phpspreadsheet:^5.7.0 or the equivalent constraint for your maintained branch.

Workarounds

  • Enforce a strict PHP max_execution_time and per-request memory limit for routes that parse spreadsheets to bound the impact of a successful exploit.
  • Pre-validate uploaded XLSX files by unzipping the archive and rejecting any sheet XML containing an r attribute greater than 1048576.
  • Place spreadsheet processing behind a sandboxed worker queue with low concurrency so a single malicious file cannot exhaust the entire web tier.
bash
# Composer update example for the 5.x branch
composer require phpoffice/phpspreadsheet:^5.7.0
composer update phpoffice/phpspreadsheet

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechPhpoffice Phpspreadsheet

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.04%

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

  • CVE-2026-40296: PhpSpreadsheet XSS Vulnerability

  • CVE-2024-45293: PHPSpreadsheet XXE 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