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
- 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.
Affected software
| Software | Affected versions |
|---|---|
phpoffice/phpspreadsheetPackagist · osv:Packagist:phpoffice/phpspreadsheet |
|
About phpoffice/phpspreadsheet
- Monthly downloads (Packagist)
- 15,804,115Packagist, 16 Nov 2026
- Total downloads (Packagist)
- 372,631,237Packagist, 16 Nov 2026
Vulnerabilities in phpoffice/phpspreadsheet
- In our list
- 9
- Published in the last 12 months
- 8
- Critical, last 12 months
- 1
- High, last 12 months
- 5
- Known exploited
- 0
- CVE-2026-59932PHPSpreadsheet: Gnumeric reader unbounded gzip expansion causes memory exhaustionHigh 7.5 23 Jul 2026
- CVE-2026-59931PHPSpreadsheet: SSRF bypass via HTTP redirect in WEBSERVICE() domain whitelistHigh 7.7 23 Jul 2026
- CVE-2026-40902PhpSpreadsheet has CPU Denial of Service via Unbounded Row Number in XLSX Row DimensionsHigh 7.5 29 Apr 2026
- CVE-2026-40863PhpSpreadsheet has CPU Denial of Service via Unbounded Row Index in SpreadsheetML XML ReaderHigh 7.5 29 Apr 2026
- CVE-2026-34084PhpSpreadsheet has SSRF/RCE in IOFactory::load when $filename is user controlledCritical 29 Apr 2026
- CVE-2026-40296PhpSpreadsheet has XSS via number format code with @ text placeholder bypasses htmlspecialchars in HTML writerMedium 5.4 28 Apr 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-59933
- GitHub Advisory Database https://github.com/advisories/GHSA-xh5m-36r6-47m3