# PHPSpreadsheet: XLS/OLE sector-chain self-loop 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-xh5m-36r6-47m3 · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high (CVSS 7.5) |
| Published | 2026-07-23 |
| Updated | 2026-07-23 |
| CVE | [CVE-2026-59933](https://nvd.nist.gov/vuln/detail/CVE-2026-59933) |
| GHSA | [GHSA-xh5m-36r6-47m3](https://github.com/advisories/GHSA-xh5m-36r6-47m3) |
| Weakness | CWE-400, CWE-835 |

| 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 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.

Vulnerability details



## Links

- [GHSA-xh5m-36r6-47m3 on GitHub](https://github.com/advisories/GHSA-xh5m-36r6-47m3)
- [CVE-2026-59933 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-59933)
- [All Composer security advisories](https://buzzphp.com/security)
