All vulnerabilities

Packagist

CVE-2026-59932

PHPSpreadsheet: Gnumeric reader unbounded gzip expansion causes memory exhaustion

Severity
High 7.5
Published
23 Jul 2026
Last changed
23 Jul 2026
Added to UpHeron
22 Oct 2026
Fixed in
1.30.6, 2.1.18, 2.4.7, 3.10.7, 5.8.1
Exploit chance
0.5% in the next 30 daysHigher than 40% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Uncontrolled resource consumption (CWE-400)Decompression bomb (CWE-409)
Attack
Over the network · No login needed · No user action needed
Attacker can
Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Also known as
GHSA-2mrg-gjxq-2gvr
Sources
OSV.dev and GitHub

Description

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.

Gnumeric::canRead() invokes gzfileGetContents() before deciding whether the file is a valid Gnumeric spreadsheet:

  • src/PhpSpreadsheet/Reader/Gnumeric.php:80-90 calls $this->gzfileGetContents($filename) from canRead().
  • src/PhpSpreadsheet/Reader/Gnumeric.php:105-115 calls canRead() and then reads the expanded contents again for worksheet-name listing.
From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
phpoffice/phpspreadsheetPackagist · osv:Packagist:phpoffice/phpspreadsheet
  • Every version before 1.30.6
  • From 2.0.0 before 2.1.18
  • From 2.2.0 before 2.4.7
  • From 3.3.0 before 3.10.7
  • From 4.0.0 before 5.8.1

About phpoffice/phpspreadsheet

Monthly downloads (Packagist)
15,804,115Packagist, 16 Nov 2026
Total downloads (Packagist)
372,631,237Packagist, 16 Nov 2026

References