Mend.io Vulnerability Database
The largest open source vulnerability database
What is a Vulnerability ID?
New vulnerability? Tell us about it!
CVE-2026-40902
Published:May 12, 2026
Updated:May 16, 2026
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.
Affected Packages
phpoffice/phpspreadsheet (PHP):
Affected version(s) >=1.0.0-beta <1.30.4
Fix Suggestion:
Update to version 1.30.4
phpoffice/phpspreadsheet (PHP):
Affected version(s) >=3.3.0 <3.10.5
Fix Suggestion:
Update to version 3.10.5
phpoffice/phpspreadsheet (PHP):
Affected version(s) >=2.0.0 <2.1.16
Fix Suggestion:
Update to version 2.1.16
phpoffice/phpspreadsheet (PHP):
Affected version(s) >=4.0.0 <5.7.0
Fix Suggestion:
Update to version 5.7.0
phpoffice/phpspreadsheet (PHP):
Affected version(s) >=2.2.0 <2.4.5
Fix Suggestion:
Update to version 2.4.5
phpoffice/phpspreadsheet (PHP):
Affected version(s) >=dev-release <1.30.4
Fix Suggestion:
Update to version 1.30.4
Do you need more information?
Contact Us
CVSS v4
Base Score:
8.7
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
NONE
Vulnerable System Integrity
NONE
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
7.5
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Weakness Type (CWE)
Allocation of Resources Without Limits or Throttling
Uncontrolled Resource Consumption
EPSS
Base Score:
0.04