CVE-2026-59932: PHPSpreadsheet Gnumeric Reader Unbounded Gzip Expansion Causes Memory Exhaustion

phpoffice/phpspreadsheet Updated 23 Jul 2026

Summary

23/07/2026
Yes i
High
7.5

CVE-2026-59932: PHPSpreadsheet: Gnumeric reader unbounded gzip expansion 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

PHPSpreadsheet is a popular library for reading and writing spreadsheet files in PHP. It supports various formats, including Excel and Gnumeric. The library is widely used in web applications for data manipulation and reporting. However, it has a vulnerability in its Gnumeric reader that allows for unbounded gzip expansion, which can lead to memory exhaustion and denial of service.

Vulnerability Detail

The vulnerability arises from the Gnumeric reader's handling of gzip-compressed files. When a .gnumeric file begins with gzip magic bytes, the library calls gzdecode() on the entire compressed content without imposing a limit on the decompressed size. This can lead to a scenario where a small compressed file expands into a significantly larger size, exceeding PHP's memory limit and crashing the process. The vulnerability is triggered during the type detection phase, making it exploitable through normal file uploads in applications that utilize 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 →

Workaround

As a temporary workaround, avoid processing untrusted .gnumeric files until the library is updated. Additionally, implement file size checks before processing to prevent excessively large files from being uploaded.

Conclusion

The vulnerability CVE-2026-59932 in PHPSpreadsheet's Gnumeric reader poses a significant risk of memory exhaustion through unbounded gzip expansion. It is crucial to update to the latest patched versions of the library and implement temporary workarounds to mitigate the risk until the update can be applied.

See every vulnerability recorded for phpoffice/phpspreadsheet →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 7.5, indicating a high severity level.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

Web applications that allow users to upload .gnumeric files are at risk, especially if they use PHPSpreadsheet for processing.

If exploited, your application may experience denial of service due to memory exhaustion, potentially crashing the PHP worker.

Yes, you can implement file size checks and avoid processing untrusted .gnumeric files until the vulnerability is patched.

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