CVE-2026-40902 json
PhpSpreadsheet: CPU Denial of Service via Unbounded Row Number in XLSX Row Dimensions
published 2026-04-29 6 mo ago modified 2026-10-26 13 d ago also GHSA-7c6m-4442-2x6m , EUVD-2026-29852
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 33%
- public exploits
- 0
- none known
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 XLSX reader's ColumnAndRowAttributes::readRowAttributes() method reads row numbers from XML attributes without validating them against the spreadsheet maximum row limit (AddressRange::MAX_ROW = 1,048,576). An attacker can craft a minimal XLSX file (~1.6KB) containing a <row r="999999999"/> element that inflates cachedHighestRow to 999,999,999, causing any subsequent row iteration to attempt ~1 billion loop cycles and exhaust CPU resources. This vulnerability is fixed in 1.30.4, 2.1.16, 2.4.5, 3.10.5, and 5.7.0.
Patch / fix
- packagist phpoffice/phpspreadsheet 1.30.4, 2.1.16, 2.4.5, 3.10.5, 5.7.0
- phpoffice phpspreadsheet 1.30.4, 2.1.16, 2.4.5, 3.10.5, 5.7.0
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 5 mo ago
Exploit prediction
0.40% chance of exploitation in the next 30 days, higher than 33% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-7c6m-4442-2x6m referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | phpoffice/phpspreadsheet | >=4.0.0, <5.7.0 >=3.3.0, <3.10.5 >=2.2.0, <2.4.5 >=2.0.0, <2.1.16 <1.30.4 |
5.7.0 3.10.5 2.4.5 2.1.16 1.30.4 |
Affected products
- PHPOffice PhpSpreadsheet
Classification
References
-
github.com
/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-7c6m-4442-2x6m
exploit, web, mitigation, vendor-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2026-40902
advisory
-
github.com
/PHPOffice/PhpSpreadsheet
package
Sources
- CVE List CVE-2026-40902
- GitHub Advisory GHSA-7c6m-4442-2x6m
- NVD CVE-2026-40902
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.