CVE-2026-40902
Full vulnerability record from the local CVENow database.
Description
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.
Severity
HIGH
CVSS score
7.5
(v3.1)
Vulnerability status
Analyzed
Source identifier
Published
2026-05-12 22:16:33.923000
Last modified
2026-10-26 14:10:00.130000
View original CVE JSON
{
"id": "CVE-2026-40902",
"sourceIdentifier": "[email protected]",
"published": "2026-05-12T22:16:33.923",
"lastModified": "2026-10-26T14:10:00.130",
"vulnStatus": "Analyzed",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "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."
},
{
"lang": "es",
"value": "PhpSpreadsheet es una biblioteca PHP pura para leer y escribir archivos de hoja de cálculo. Antes de 1.30.4, 2.1.16, 2.4.5, 3.10.5 y 5.7.0, el método ColumnAndRowAttributes::readRowAttributes() del lector XLSX lee números de fila de atributos XML sin validarlos contra el límite máximo de filas de la hoja de cálculo (AddressRange::MAX_ROW = 1.048.576). Un atacante puede crear un archivo XLSX mínimo (~1,6KB) que contenga un elemento <row r=’999999999’/> que infla cachedHighestRow a 999.999.999, lo que hace que cualquier iteración de fila posterior intente ~1.000 millones de ciclos de bucle y agote los recursos de la CPU. Esta vulnerabilidad está corregida en 1.30.4, 2.1.16, 2.4.5, 3.10.5 y 5.7.0."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "PHPOffice",
"product": "PhpSpreadsheet",
"versions": [
{
"version": "< 1.30.4",
"status": "affected"
},
{
"version": ">= 2.0.0, < 2.1.16",
"status": "affected"
},
{
"version": ">= 2.2.0, < 2.4.5",
"status": "affected"
},
{
"version": ">= 3.3.0, < 3.10.5",
"status": "affected"
},
{
"version": ">= 4.0.0, < 5.7.0",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "[email protected]",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"baseScore": 7.5,
"baseSeverity": "HIGH",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "NONE",
"integrityImpact": "NONE",
"availabilityImpact": "HIGH"
},
"exploitabilityScore": 3.9,
"impactScore": 3.6
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-05-13T12:11:26.338564Z",
"id": "CVE-2026-40902",
"options": [
{
"exploitation": "poc"
},
{
"automatable": "yes"
},
{
"technicalImpact": "partial"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-770"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:a:phpoffice:phpspreadsheet:*:*:*:*:*:*:*:*",
"versionEndExcluding": "1.30.4",
"matchCriteriaId": "21F2C6F6-C903-4A65-BCB4-4549FE752ED5"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:phpoffice:phpspreadsheet:*:*:*:*:*:*:*:*",
"versionStartIncluding": "2.0.0",
"versionEndExcluding": "2.1.16",
"matchCriteriaId": "E27B01CE-562C-4746-A7F5-E402B25F0B47"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:phpoffice:phpspreadsheet:*:*:*:*:*:*:*:*",
"versionStartIncluding": "2.2.0",
"versionEndExcluding": "2.4.5",
"matchCriteriaId": "46FF2D5E-816F-481B-AA45-41BA6EDCFEA0"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:phpoffice:phpspreadsheet:*:*:*:*:*:*:*:*",
"versionStartIncluding": "3.3.0",
"versionEndExcluding": "3.10.5",
"matchCriteriaId": "DF58DF5C-8F1B-4B1B-80A0-001B47751D9F"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:phpoffice:phpspreadsheet:*:*:*:*:*:*:*:*",
"versionStartIncluding": "4.0.0",
"versionEndExcluding": "5.7.0",
"matchCriteriaId": "DD7DEDE3-C624-4524-9B08-08B92F28C40C"
}
]
}
]
}
],
"references": [
{
"url": "https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-7c6m-4442-2x6m",
"source": "[email protected]",
"tags": [
"Exploit",
"Mitigation",
"Vendor Advisory"
]
},
{
"url": "https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-7c6m-4442-2x6m",
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"tags": [
"Exploit",
"Mitigation",
"Vendor Advisory"
]
}
]
}