# PHPSpreadsheet: Gnumeric reader unbounded gzip expansion causes memory exhaustion

High severity, published 2026-07-23. Update phpoffice/phpspreadsheet to the fixed version of your branch (5.8.1, 3.10.7, 2.4.7, 2.1.18, 1.30.6): composer update phpoffice/phpspreadsheet.

Canonical URL: https://buzzphp.com/security/ghsa-2mrg-gjxq-2gvr · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high (CVSS 7.5) |
| Published | 2026-07-23 |
| Updated | 2026-07-23 |
| CVE | [CVE-2026-59932](https://nvd.nist.gov/vuln/detail/CVE-2026-59932) |
| GHSA | [GHSA-2mrg-gjxq-2gvr](https://github.com/advisories/GHSA-2mrg-gjxq-2gvr) |
| Weakness | CWE-400, CWE-409 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| phpoffice/phpspreadsheet | >= 4.0.0, <= 5.8.0 or >= 3.3.0, <= 3.10.6 or >= 2.2.0, <= 2.4.6 or >= 2.0.0, <= 2.1.17 or <= 1.30.5 | 5.8.1, 3.10.7, 2.4.7, 2.1.18, 1.30.6 |

## What to do

Update phpoffice/phpspreadsheet to the fixed version of your branch (5.8.1, 3.10.7, 2.4.7, 2.1.18, 1.30.6): composer update phpoffice/phpspreadsheet.

Check which version you run with `composer show phpoffice/phpspreadsheet`, and every affected package with `composer audit`.

## About this advisory

Summary

PhpSpreadsheet's Gnumeric reader reads attacker-supplied .gnumeric files into memory and, when the file starts with gzip magic bytes, calls gzdecode() on the full compressed contents without enforcing a decompressed-size limit. A very small compressed .gnumeric file can expand to data larger than the PHP memory limit and crash the process during Gnumeric::canRead() before the file is rejected or fully parsed.

This is reachable through normal file-type detection and Gnumeric loading paths, so applications that accept attacker-controlled spreadsheet uploads can suffer denial of service.

Vulnerability details



## Links

- [GHSA-2mrg-gjxq-2gvr on GitHub](https://github.com/advisories/GHSA-2mrg-gjxq-2gvr)
- [CVE-2026-59932 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-59932)
- [All Composer security advisories](https://buzzphp.com/security)
