# CVE-2026-40863: PHPOffice PhpSpreadsheet denial of service in SpreadsheetML XML reader

Source: https://junglewise.ai/threats/cve-2026-40863-phpspreadsheet-has-cpu-denial-of-service-via-unbounded-row-index  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-12. Updated: 2026-05-14  
License: CC BY 4.0 with a link back

CVE-2026-40863 · Severity: high · CVSS 7.5 · Published 2026-05-12

PhpSpreadsheet, a popular PHP library for handling Excel and XML spreadsheet files, is vulnerable to a denial-of-service attack. An attacker can provide a specially crafted, very small XML file that forces the server to attempt to process billions of empty rows. This results in extreme CPU exhaustion, potentially crashing the web server or making the application unavailable to all users.

Technologies: [phpoffice/phpspreadsheet (Packagist)](https://junglewise.ai/threats/technologies/phpoffice-phpspreadsheet), [Phpoffice Phpspreadsheet](https://junglewise.ai/threats/technologies/phpspreadsheet). Vendors: [Packagist](https://junglewise.ai/threats/vendors/packagist), [Phpoffice](https://junglewise.ai/threats/vendors/phpoffice).

## Quick answers

**Is CVE-2026-40863 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-40863 being exploited in the wild.

**How severe is CVE-2026-40863?** High severity, with a CVSS score of 7.5, published 12 May 2026.

**Which products and versions are affected?** phpoffice/phpspreadsheet (Packagist) ECOSYSTEM:introduced=4.0.0,fixed=5.7.0; Phpoffice Phpspreadsheet < 1.30.4, >= 2.0.0 < 2.1.16, >= 2.2.0 < 2.4.5, >= 3.3.0 < 3.10.5, >= 4.0.0 < 5.7.0.

**Is there a fix for CVE-2026-40863?** Yes. phpoffice/phpspreadsheet (Packagist): upgrade to 5.7.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-40863 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-40863?** Check whether you run phpoffice/phpspreadsheet (Packagist) or Phpoffice Phpspreadsheet at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- phpoffice/phpspreadsheet (Packagist): upgrade to 5.7.0 or later

  ```sh
  composer require phpoffice/phpspreadsheet:^5.7.0
  ```


## Technical details

The SpreadsheetML XML reader (Reader\Xml) in PhpSpreadsheet fails to validate the 'ss:Index' row attribute against the library's maximum allowed row count (AddressRange::MAX_ROW). By providing a value such as '999999999', an attacker can inflate the internal 'cachedHighestRow' property to approximately one billion. Subsequent calls to 'getRowIterator()' without an explicit end row will attempt to iterate through the entire range, leading to 100% CPU utilization and a denial-of-service condition. The vulnerability can be triggered with a small (~300 byte) XML file and requires no authentication. Patches are available in versions 1.30.4, 2.1.16, 2.4.5, 3.10.5, and 5.7.0.

## Affected products

- PHPOffice PhpSpreadsheet < 1.30.4, >= 2.0.0 < 2.1.16, >= 2.2.0 < 2.4.5, >= 3.3.0 < 3.10.5, >= 4.0.0 < 5.7.0

## Identifiers

- CVE-2026-40863
- GHSA-84wq-86v6-x5j6

## Timeline

- 2026-04-28: advisory: GitHub advisory published by maintainers
- 2026-05-12: disclosed: CVE published to NVD

## References

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

## Related threats

- [PHPOffice PhpSpreadsheet redirect validation bypass in external image loading](https://junglewise.ai/threats/cve-2026-108360-phpspreadsheet-is-a-pure-php-library-for-reading-and-writing)
- [PhpSpreadsheet denial-of-service via unbounded row repetition](https://junglewise.ai/threats/cve-2026-108359-phpspreadsheet-is-a-pure-php-library-for-reading-and-writing)
- [PhpSpreadsheet XmlScanner XML entity expansion denial of service](https://junglewise.ai/threats/cve-2026-108358-phpspreadsheet-is-a-pure-php-library-for-reading-and-writing)
- [PHPOffice PhpSpreadsheet XML entity expansion denial of service](https://junglewise.ai/threats/cve-2026-108357-phpspreadsheet-is-a-pure-php-library-for-reading-and-writing)
- [MediaWiki DataTransfer Extension uncontrolled resource consumption](https://junglewise.ai/threats/cve-2026-100242-dependency-on-vulnerable-third-party-component-and-uncontrolled)
