PhpSpreadsheet: CPU Denial of Service via Unbounded Row Index in SpreadsheetML XML Reader
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-770.
Summary
PhpSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Prior to 1.30.4, 2.1.16, 2.4.5, 3.10.5, and 5.7.0, the SpreadsheetML XML reader (Reader\Xml) does not validate the ss:Index row attribute against the maximum allowed row count (AddressRange::MAX_ROW = 1,048,576). An attacker can craft a SpreadsheetML XML file with ss:Index="999999999" on a <Row> element, which inflates the internal cachedHighestRow to ~1 billion. Any subsequent call to getRowIterator() without an explicit end row will attempt to iterate ~1 billion rows, causing CPU exhaustion and denial of service. This vulnerability is fixed in 1.30.4, 2.1.16, 2.4.5, 3.10.5, and 5.7.0.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| PHPOffice | PhpSpreadsheet | before 1.30.4; 2.0.0 to before 2.1.16; 2.2.0 to before 2.4.5; 3.3.0 to before 3.10.5; 4.0.0 to before 5.7.0 | 1.30.4, 2.1.16, 2.4.5, 3.10.5, 5.7.0 | Patch available | CNA |
| — | phpoffice/phpspreadsheet (Packagist) | 4.0.0 to before 5.7.0 | 5.7.0 | Patch available | GHSA-84wq-86v6-x5j6 |
| — | phpoffice/phpspreadsheet (Packagist) | 3.3.0 to before 3.10.5 | 3.10.5 | Patch available | GHSA-84wq-86v6-x5j6 |
| — | phpoffice/phpspreadsheet (Packagist) | 2.2.0 to before 2.4.5 | 2.4.5 | Patch available | GHSA-84wq-86v6-x5j6 |
| — | phpoffice/phpspreadsheet (Packagist) | 2.0.0 to before 2.1.16 | 2.1.16 | Patch available | GHSA-84wq-86v6-x5j6 |
| — | phpoffice/phpspreadsheet (Packagist) | before 1.30.6 | 1.30.6 | Patch available | GHSA-84wq-86v6-x5j6 |
- PhpSpreadsheet VendorPHPOffice Affected before 1.30.4; 2.0.0 to before 2.1.16; 2.2.0 to before 2.4.5; 3.3.0 to before 3.10.5; 4.0.0 to before 5.7.0 Fixed in 1.30.4, 2.1.16, 2.4.5, 3.10.5, 5.7.0 Patch available CNA
- phpoffice/phpspreadsheet (Packagist) Vendor— Affected 4.0.0 to before 5.7.0 Fixed in 5.7.0 Patch available GHSA-84wq-86v6-x5j6
- phpoffice/phpspreadsheet (Packagist) Vendor— Affected 3.3.0 to before 3.10.5 Fixed in 3.10.5 Patch available GHSA-84wq-86v6-x5j6
- phpoffice/phpspreadsheet (Packagist) Vendor— Affected 2.2.0 to before 2.4.5 Fixed in 2.4.5 Patch available GHSA-84wq-86v6-x5j6
- phpoffice/phpspreadsheet (Packagist) Vendor— Affected 2.0.0 to before 2.1.16 Fixed in 2.1.16 Patch available GHSA-84wq-86v6-x5j6
- phpoffice/phpspreadsheet (Packagist) Vendor— Affected before 1.30.6 Fixed in 1.30.6 Patch available GHSA-84wq-86v6-x5j6
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:phpoffice:phpspreadsheet:*:*:*:*:*:*:*:* | before 1.30.4; 2.0.0 to before 2.1.16; 2.2.0 to before 2.4.5; 3.3.0 to before 3.10.5; 4.0.0 to before 5.7.0 | Vulnerable | PHPOffice |
- cpe:2.3:a:phpoffice:phpspreadsheet:*:*:*:*:*:*:*:* Versions before 1.30.4; 2.0.0 to before 2.1.16; 2.2.0 to before 2.4.5; 3.3.0 to before 3.10.5; 4.0.0 to before 5.7.0 Vulnerable ·PHPOffice
Remediation
- Fix · CNA PhpSpreadsheet (PHPOffice) Fixed in 1.30.4, 2.1.16, 2.4.5, 3.10.5, 5.7.0
- Fix · GHSA-84wq-86v6-x5j6 phpoffice/phpspreadsheet (Packagist) Fixed in 5.7.0 Advisory →
- Fix · GHSA-84wq-86v6-x5j6 phpoffice/phpspreadsheet (Packagist) Fixed in 3.10.5 Advisory →
- Fix · GHSA-84wq-86v6-x5j6 phpoffice/phpspreadsheet (Packagist) Fixed in 2.4.5 Advisory →
- Fix · GHSA-84wq-86v6-x5j6 phpoffice/phpspreadsheet (Packagist) Fixed in 2.1.16 Advisory →
- Fix · GHSA-84wq-86v6-x5j6 phpoffice/phpspreadsheet (Packagist) Fixed in 1.30.6 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-40863
- 2026-10-03 Alias added: GHSA-84wq-86v6-x5j6
References
More PHPOffice Phpspreadsheet vulnerabilities
- TI-2026-26406 PhpSpreadsheet SSRF and RCE via PHP stream wrappers in IOFactory::load CVSS 4.0CRITICAL 9.2
- TI-2024-37339 PhpSpreadsheet vulnerable to unauthorized reflected XSS in Currency.php file CVSS 4.0HIGH 8.3
- TI-2024-37338 PhpSpreadsheet allows unauthorized reflected XSS in `Convert-Online.php` file CVSS 4.0HIGH 8.3
- TI-2024-37325 PhpSpreadsheet vulnerable to unauthorized reflected XSS in the Accounting.php file CVSS 4.0HIGH 8.3
- TI-2024-37324 PhpSpreadsheet vulnerable to unauthorized reflected XSS in the constructor of the Downloader class CVSS 4.0HIGH 8.3
- TI-2024-30160 XML External Entity Reference (XXE) in PHPSpreadsheet CVSS 3.1HIGH 8.8
Sources
- CVE-2026-40863 · CVE Program
- CVE-2026-40863 · NVD
- FIRST EPSS
- GHSA-84wq-86v6-x5j6 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences