Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. phpoffice/phpspreadsheet
  4. ›
  5. CVE-2026-40863

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

April 29, 2026

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.

References

  • github.com/PHPOffice/PhpSpreadsheet
  • github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-84wq-86v6-x5j6
  • github.com/advisories/GHSA-84wq-86v6-x5j6
  • nvd.nist.gov/vuln/detail/CVE-2026-40863

Code Behaviors & Features

Detect and mitigate CVE-2026-40863 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.30.4, all versions starting from 2.0.0 before 2.1.16, all versions starting from 2.2.0 before 2.4.5, all versions starting from 3.3.0 before 3.10.5, all versions starting from 4.0.0 before 5.7.0

Fixed versions

  • 5.7.0
  • 3.10.5
  • 2.4.5
  • 2.1.16
  • 1.30.4

Solution

Upgrade to versions 1.30.4, 2.1.16, 2.4.5, 3.10.5, 5.7.0 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-400: Uncontrolled Resource Consumption

Source file

packagist/phpoffice/phpspreadsheet/CVE-2026-40863.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:20:24 +0000.