CVE-2026-59933: PHPSpreadsheet Memory Exhaustion Due to XLS/OLE Sector-Chain Self-Loop

phpoffice/phpspreadsheet Updated 23 Jul 2026

Summary

23/07/2026
Yes i
High
7.5

CVE-2026-59933: PHPSpreadsheet: XLS/OLE sector-chain self-loop causes memory exhaustion. Affects phpoffice/phpspreadsheet across 5 version ranges.

< 1.30.6 >= 2.0.0, < 2.1.18 >= 2.2.0, < 2.4.7 >= 3.3.0, < 3.10.7 >= 4.0.0, < 5.8.1

Fixed in 5 releases; the minimum fixed version depends on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

PHPSpreadsheet is a popular open-source library used for reading and writing spreadsheet files in various formats, including Excel. It provides a comprehensive set of features for manipulating spreadsheet data, making it a valuable tool for developers. However, it is vulnerable to a specific issue where malformed XLS/OLE files can cause memory exhaustion, leading to denial of service in applications that utilize this library.

Vulnerability Detail

The vulnerability arises from the OLE reader in PHPSpreadsheet, which follows sector chains from attacker-controlled XLS/OLE metadata without detecting cycles or enforcing a maximum chain length. An attacker can create a tiny malformed .xls file that causes the small-block depot sector chain to point back to itself. This results in an infinite loop during the reading process, where the same sector data is appended repeatedly until the PHP process exhausts its memory. The issue is particularly dangerous as it can be triggered during automatic spreadsheet type detection, affecting applications that accept user-uploaded spreadsheets.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 1.30.6 1.30.6
    composer require phpoffice/phpspreadsheet:1.30.6
  • >= 2.0.0, < 2.1.18 2.1.18
    composer require phpoffice/phpspreadsheet:2.1.18
  • >= 2.2.0, < 2.4.7 2.4.7
    composer require phpoffice/phpspreadsheet:2.4.7
  • >= 3.3.0, < 3.10.7 3.10.7
    composer require phpoffice/phpspreadsheet:3.10.7
  • >= 4.0.0, < 5.8.1 5.8.1
    composer require phpoffice/phpspreadsheet:5.8.1

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, you can implement input validation to reject any XLS/OLE files that do not conform to expected formats or sizes before processing them with PHPSpreadsheet. This can help mitigate the risk of memory exhaustion from malformed files.

Conclusion

CVE-2026-59933 poses a significant risk to applications using PHPSpreadsheet by allowing attackers to exploit malformed XLS/OLE files, leading to memory exhaustion. It is crucial to update to the latest patched versions of the library and implement input validation as a temporary measure to mitigate this risk.

See every vulnerability recorded for phpoffice/phpspreadsheet →

Share this vulnerability

FAQ

CVE-2026-59933 is a vulnerability in PHPSpreadsheet that allows for memory exhaustion due to a self-loop in the XLS/OLE sector chain.

If your application processes user-uploaded spreadsheets using PHPSpreadsheet, it may crash or become unresponsive due to memory exhaustion caused by this vulnerability.

Affected versions include all versions prior to 5.8.1, 3.10.7, 2.4.7, and 2.1.18.

You can use Vulert, which monitors open-source vulnerabilities in your software. By uploading your composer.lock file to Vulert, you can receive real-time alerts about vulnerabilities, including CVE-2026-59933.

Yes, implementing strict input validation for uploaded spreadsheet files can help prevent the exploitation of this vulnerability until you can update to a patched version.

Related vulnerabilities

Recent vulnerabilities recorded for phpoffice/phpspreadsheet.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 1.30.6 1.30.6
    composer require phpoffice/phpspreadsheet:1.30.6
  • >= 2.0.0, < 2.1.18 2.1.18
    composer require phpoffice/phpspreadsheet:2.1.18
  • >= 2.2.0, < 2.4.7 2.4.7
    composer require phpoffice/phpspreadsheet:2.4.7
  • >= 3.3.0, < 3.10.7 3.10.7
    composer require phpoffice/phpspreadsheet:3.10.7
  • >= 4.0.0, < 5.8.1 5.8.1
    composer require phpoffice/phpspreadsheet:5.8.1

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback