All vulnerabilities

Packagist

CVE-2026-59933

PHPSpreadsheet: XLS/OLE sector-chain self-loop 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)Infinite loop (CWE-835)
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-xh5m-36r6-47m3
Sources
OSV.dev and GitHub

Description

PhpSpreadsheet's OLE reader follows sector chains from attacker-controlled XLS/OLE metadata without detecting cycles or enforcing a maximum chain length. A tiny malformed .xls/OLE file can set the small-block depot sector chain to point back to itself. During normal XLS detection, OLERead::read() appends the same sector data repeatedly until the PHP process exhausts memory.

This is reachable from Reader\Xls::canRead() and therefore from automatic spreadsheet type detection. Applications that accept attacker-controlled spreadsheet uploads can suffer denial of service from a very small file.

OLERead::read() loads the input and builds sector chains from attacker-controlled OLE header and allocation-table values:

  • src/PhpSpreadsheet/Shared/OLERead.php:82 reads the entire file after validating only the OLE magic.
  • src/PhpSpreadsheet/Shared/OLERead.php:84-97 reads sector-chain metadata from the file header.
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