CVE-2026-40902 json
PhpSpreadsheet: CPU Denial of Service via Unbounded Row Number in XLSX Row Dimensions
published 6mo ago modified 14d ago also EUVD-2026-29852 , GHSA-7c6m-4442-2x6m
- 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
- phpspreadsheet_project phpspreadsheet 1.30.4, 2.1.16, 2.4.5, 3.10.5, 5.7.0
Is CVE-2026-40902 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 5mo ago
Exploit prediction
0.40% chance of exploitation in the next 30 days, higher than 33% of all scored CVEs (FIRST EPSS, 2026-11-09).
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 Intel 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.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.