CVE-2026-108359
PhpSpreadsheet ODS Reader: Unbounded number-rows-repeated → CPU & Memory Exhaustion (DoS)
PhpSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Prior to 1.30.7, 2.1.19, 2.4.8, 3.10.8, and 5.10.0, Ods::processTableRow in src/PhpSpreadsheet/Reader/Ods.php accepts an unbounded table:number-rows-repeated attribute from an ODS table row. When the row contains a value, the reader materializes a cell for every repetition without checking the spreadsheet row limit, so a small attacker-controlled ODS file can consume substantial CPU and memory and terminate the PHP worker. Column repetition is separately bounded and is not part of this vulnerability. This issue is fixed in versions 1.30.7, 2.1.19, 2.4.8, 3.10.8, and 5.10.0.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
8.7
PhpSpreadsheet ODS Reader: Unbounded number-rows-repeated → CPU & Memory Exhaustion (DoS)
PhpSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Prior to 1.30.7, 2.1.19, 2.4.8, 3.10.8, and 5.10.0, Ods::processTableRow in src/PhpSpreadsheet/Reader/Ods.php accepts an unbounded table:number-rows-repeated attribute from an ODS table row. When the row contains a value, the reader materializes a cell for every repetition without checking the spreadsheet row limit, so a small attacker-controlled ODS file can consume substantial CPU and memory and terminate the PHP worker. Column repetition is separately bounded and is not part of this vulnerability. This issue is fixed in versions 1.30.7, 2.1.19, 2.4.8, 3.10.8, and 5.10.0.
- Record
CVE-2026-108359- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N - Weakness
- CWE-400, CWE-789
- Updated
- 2026-11-02
EUVDEUVD-2026-108267
8.7
PhpSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Prior to 1.30.7, 2.1.19, 2.4.8, 3.10.8, and 5.10.0, Ods::processTableRow in src/PhpSpreadsheet/Reader/Ods.php accepts an unbounded table:number-rows-repeated attribute from an ODS table row. When the row contains a value, the reader materializes a cell for every repetition without checking the spreadsheet row limit, so a small attacker-controlled ODS file can consume substantial CPU and memory and terminate the PHP worker. Column repetition is separately bounded and is not part of this vulnerability. This issue is fixed in versions 1.30.7, 2.1.19, 2.4.8, 3.10.8, and 5.10.0.
- Record
EUVD-2026-108267- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-j2w7-387v-m2rq
8.7
PhpSpreadsheet ODS Reader: Unbounded number-rows-repeated → CPU & Memory Exhaustion (DoS)
Summary
When PhpSpreadsheet loads an OpenDocument Spreadsheet (.ods), Ods::processTableRow()
reads the table:number-rows-repeated attribute of a <table:table-row> with an unchecked
(int) cast, then materialises one cell per repeated row. This value is completely unbounded,
so a single ~1.4 KB file can instruct the reader to create up to millions of cells,
exhausting memory (fatal OOM). No authentication, no special configuration, and the default read
filter are required - any application that loads a user-supplied .ods is affected.
Affected versions
The number-rows-repeated expansion has existed in the ODS reader since its inception
(pre-dating the current release branches), so all maintained lines are affected.
| Branch | Affected | |--------|----------| | 1.x | ≤ 1.30.6 | | 2.0–2.1 | ≤ 2.1.18 | | 2.2–2.4 | ≤ 2.4.7 | | 3.x | ≤ 3.10.7 | | 4.x–5.x | ≤ 5.9.0 (latest) |
Root cause (source → sink)
src/PhpSpreadsheet/Reader/Ods.php:
// line 816 — row repeat, unchecked (int) cast
$rowRepeats = (int) $childNode->getAttributeNS($tableNs, 'number-rows-repeated');
...
// line 1151 — row materialisation loop: NO upper bound
for ($rowAdjust = 0; $rowAdjust < $rowRepeats; ++$rowAdjust) {
$rID = $rowID + $rowAdjust;
$cell = $spreadsheet->getActiveSheet()->getCell($columnID . $rID); // allocates a Cell
$cell->setValueExplicit($dataValue, $type);
// ... no bounds check on $rowAdjust or $rID ...
}
Why columns are NOT vulnerable (already bounded):
The column-header loop at line 1326 shows the correct pattern with bounds checking:
// line 1326 (processTableColumnHeader): BOUNDED correctly
for ($rowRepeats2 = $rowRepeats; $rowRepeats2 > 0 && $tableColumnIndex2 <= AddressRange::MAX_COLUMN_INT; --$rowRepeats2) {
// HAS BOUNDS CHECK: && $tableColumnIndex2 <= AddressRange::MAX_COLUMN_INT
}
Additionally, the cell-data column loop at line 1141 calls getCell() which throws exception
at Coordinate.php:448 when column exceeds MAX_COLUMN_INT (XFD / 16,384):
// Coordinate.php line 448
if ($columnIndex > self::MAX_COLUMN_INT) {
throw new Exception('Column string index can not be beyond XFD');
}
Result: Columns are capped at 16,384. Only rows are unbounded.
Impact
Memory exhaustion (single valued cell, repeated many rows):
A non-null cell value with a huge number-rows-repeated attribute materialises millions of
Cell objects → PHP fatal Allowed memory size ... exhausted.
Example:
- Payload:
<table:table-row table:number-rows-repeated="5000000">(5 million rows) - File size: 1.4 KB
- Memory consumed: ~256 MB (one Cell object per row)
- Result: OOM at default memory limit
Reproduction
Vulnerable payload (causes OOM):
<table:table table:name="Sheet1">
<table:table-row table:number-rows-repeated="5000000">
<table:table-cell office:value-type="float" office:value="1">
<text:p>1</text:p>
</table:table-cell>
</table:table-row>
</table:table>
Not vulnerable (for reference - throws exception):
<table:table table:name="Sheet1">
<table:table-row>
<table:table-cell office:value-type="float" office:value="1"
table:number-columns-repeated="1000000000">
<text:p>1</text:p>
</table:table-cell>
</table:table-row>
</table:table>
This column-repeat example throws Column string index can not be beyond XFD exception
(bounded defense, already in place).
- Record
GHSA-j2w7-387v-m2rq- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N - Weakness
- CWE-400, CWE-789
- Updated
- 2026-11-02
NVD
8.7
PhpSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Prior to 1.30.7, 2.1.19, 2.4.8, 3.10.8, and 5.10.0, Ods::processTableRow in src/PhpSpreadsheet/Reader/Ods.php accepts an unbounded table:number-rows-repeated attribute from an ODS table row. When the row contains a value, the reader materializes a cell for every repetition without checking the spreadsheet row limit, so a small attacker-controlled ODS file can consume substantial CPU and memory and terminate the PHP worker. Column repetition is separately bounded and is not part of this vulnerability. This issue is fixed in versions 1.30.7, 2.1.19, 2.4.8, 3.10.8, and 5.10.0.
- Record
CVE-2026-108359- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Weakness
- CWE-400, CWE-789
- Updated
- 2026-11-02
OSV
8.7
PhpSpreadsheet ODS Reader: Unbounded number-rows-repeated → CPU & Memory Exhaustion (DoS)
PhpSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Prior to 1.30.7, 2.1.19, 2.4.8, 3.10.8, and 5.10.0, Ods::processTableRow in src/PhpSpreadsheet/Reader/Ods.php accepts an unbounded table:number-rows-repeated attribute from an ODS table row. When the row contains a value, the reader materializes a cell for every repetition without checking the spreadsheet row limit, so a small attacker-controlled ODS file can consume substantial CPU and memory and terminate the PHP worker. Column repetition is separately bounded and is not part of this vulnerability. This issue is fixed in versions 1.30.7, 2.1.19, 2.4.8, 3.10.8, and 5.10.0.
- Record
CVE-2026-108359- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N - Weakness
- CWE-400, CWE-789
- Updated
- 2026-11-02
OSVGHSA-j2w7-387v-m2rq
8.7
PhpSpreadsheet ODS Reader: Unbounded number-rows-repeated → CPU & Memory Exhaustion (DoS)
Summary
When PhpSpreadsheet loads an OpenDocument Spreadsheet (.ods), Ods::processTableRow()
reads the table:number-rows-repeated attribute of a <table:table-row> with an unchecked
(int) cast, then materialises one cell per repeated row. This value is completely unbounded,
so a single ~1.4 KB file can instruct the reader to create up to millions of cells,
exhausting memory (fatal OOM). No authentication, no special configuration, and the default read
filter are required - any application that loads a user-supplied .ods is affected.
Affected versions
The number-rows-repeated expansion has existed in the ODS reader since its inception
(pre-dating the current release branches), so all maintained lines are affected.
| Branch | Affected | |--------|----------| | 1.x | ≤ 1.30.6 | | 2.0–2.1 | ≤ 2.1.18 | | 2.2–2.4 | ≤ 2.4.7 | | 3.x | ≤ 3.10.7 | | 4.x–5.x | ≤ 5.9.0 (latest) |
Root cause (source → sink)
src/PhpSpreadsheet/Reader/Ods.php:
// line 816 — row repeat, unchecked (int) cast
$rowRepeats = (int) $childNode->getAttributeNS($tableNs, 'number-rows-repeated');
...
// line 1151 — row materialisation loop: NO upper bound
for ($rowAdjust = 0; $rowAdjust < $rowRepeats; ++$rowAdjust) {
$rID = $rowID + $rowAdjust;
$cell = $spreadsheet->getActiveSheet()->getCell($columnID . $rID); // allocates a Cell
$cell->setValueExplicit($dataValue, $type);
// ... no bounds check on $rowAdjust or $rID ...
}
Why columns are NOT vulnerable (already bounded):
The column-header loop at line 1326 shows the correct pattern with bounds checking:
// line 1326 (processTableColumnHeader): BOUNDED correctly
for ($rowRepeats2 = $rowRepeats; $rowRepeats2 > 0 && $tableColumnIndex2 <= AddressRange::MAX_COLUMN_INT; --$rowRepeats2) {
// HAS BOUNDS CHECK: && $tableColumnIndex2 <= AddressRange::MAX_COLUMN_INT
}
Additionally, the cell-data column loop at line 1141 calls getCell() which throws exception
at Coordinate.php:448 when column exceeds MAX_COLUMN_INT (XFD / 16,384):
// Coordinate.php line 448
if ($columnIndex > self::MAX_COLUMN_INT) {
throw new Exception('Column string index can not be beyond XFD');
}
Result: Columns are capped at 16,384. Only rows are unbounded.
Impact
Memory exhaustion (single valued cell, repeated many rows):
A non-null cell value with a huge number-rows-repeated attribute materialises millions of
Cell objects → PHP fatal Allowed memory size ... exhausted.
Example:
- Payload:
<table:table-row table:number-rows-repeated="5000000">(5 million rows) - File size: 1.4 KB
- Memory consumed: ~256 MB (one Cell object per row)
- Result: OOM at default memory limit
Reproduction
Vulnerable payload (causes OOM):
<table:table table:name="Sheet1">
<table:table-row table:number-rows-repeated="5000000">
<table:table-cell office:value-type="float" office:value="1">
<text:p>1</text:p>
</table:table-cell>
</table:table-row>
</table:table>
Not vulnerable (for reference - throws exception):
<table:table table:name="Sheet1">
<table:table-row>
<table:table-cell office:value-type="float" office:value="1"
table:number-columns-repeated="1000000000">
<text:p>1</text:p>
</table:table-cell>
</table:table-row>
</table:table>
This column-repeat example throws Column string index can not be beyond XFD exception
(bounded defense, already in place).
- Record
GHSA-j2w7-387v-m2rq- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N - Weakness
- CWE-400, CWE-789
- Updated
- 2026-11-02
OSVCLSA-2026-1793372756 No score
TuxCare security update for phpoffice/phpspreadsheet (3 CVEs)
TuxCare rebuilt phpoffice/phpspreadsheet to address 3 CVEs. Fixed in 4.5.0-p5+tuxcare.
- Record
CLSA-2026-1793372756- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
phpoffice/phpspreadsheetPackagist |
4.0.0 to 5.9.0 | 5.10.0 |
phpoffice/phpspreadsheetPackagist |
3.3.0 to 3.10.7 | 3.10.8 |
phpoffice/phpspreadsheetPackagist |
2.2.0 to 2.4.7 | 2.4.8 |
phpoffice/phpspreadsheetPackagist |
2.0.0 to 2.1.18 | 2.1.19 |
phpoffice/phpspreadsheetPackagist |
through 1.30.6 | 1.30.7 |
phpoffice/phpspreadsheetTuxCare:Packagist From an advisory covering 3 CVEs |
4.5.0 up to 4.5.0-p5+tuxcare, plus listed versions 4.5.0-p1+tuxcare4.5.0-p2+tuxcare4.5.0-p3+tuxcare4.5.0-p4+tuxcare |
4.5.0-p5+tuxcare |
phpoffice/phpspreadsheetPackagist |
4.0.0 up to 5.10.0, plus listed versions 4.1.04.2.04.3.04.3.14.4.0 Show 12 moreShow less4.5.05.0.05.1.05.2.05.3.05.4.05.5.05.6.05.7.05.8.05.8.15.9.0 |
5.10.0 |
phpoffice/phpspreadsheetPackagist |
3.3.0 up to 3.10.8, plus listed versions 3.10.03.10.13.10.23.10.33.10.4 Show 12 moreShow less3.10.53.10.63.10.73.4.03.5.03.6.03.7.03.8.03.9.03.9.13.9.23.9.3 |
3.10.8 |
phpoffice/phpspreadsheetPackagist |
2.2.0 up to 2.4.8, plus listed versions 2.2.12.2.22.3.02.3.102.3.2 Show 15 moreShow less2.3.32.3.42.3.52.3.62.3.72.3.82.3.92.4.02.4.12.4.22.4.32.4.42.4.52.4.62.4.7 |
2.4.8 |
phpoffice/phpspreadsheetPackagist |
2.0.0 up to 2.1.19, plus listed versions 2.1.02.1.12.1.102.1.112.1.12 Show 13 moreShow less2.1.132.1.142.1.152.1.162.1.172.1.182.1.32.1.42.1.52.1.62.1.72.1.82.1.9 |
2.1.19 |
phpoffice/phpspreadsheetPackagist |
before 1.30.7, plus listed versions 1.0.01.0.0-beta1.0.0-beta21.1.01.10.0 Show 45 moreShow less1.10.11.11.01.12.01.13.01.14.01.14.11.15.01.16.01.17.01.17.11.18.01.19.01.2.01.2.11.20.01.21.01.22.01.23.01.24.01.24.11.25.01.25.11.25.21.26.01.27.01.27.11.28.01.29.01.29.11.29.101.29.111.29.121.29.21.29.41.29.51.29.61.29.71.29.81.29.91.3.01.3.11.30.01.30.11.30.21.30.3 |
1.30.7 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-108359 is a high vulnerability (CVSS 8.7) in Phpoffice Phpspreadsheet, published October 22, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.66%, the 51st percentile. Fixed in phpoffice/phpspreadsheet 5.10.0.
References
github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-j2w7-387v-m2rq
github.com/PHPOffice/PhpSpreadsheet/commit/299993894dce37aa3b64aa23e9a3f4bb77ab0e66
github.com/PHPOffice/PhpSpreadsheet/commit/2de29384aa11223ee08136c0e6a9e9981bc1a2eb
github.com/PHPOffice/PhpSpreadsheet/commit/980b5c294493856f1a25754f1e8a1d2185b93738
github.com/PHPOffice/PhpSpreadsheet/commit/9a0b48622ebfe93fa48cb9bc09ce57303bb07af9
github.com/PHPOffice/PhpSpreadsheet/commit/da13f40e8760d599b0e8a296017d4b028b20e86c
Show 9 moreShow less
github.com/PHPOffice/PhpSpreadsheet/releases/tag/1.30.7
github.com/PHPOffice/PhpSpreadsheet/releases/tag/2.1.19
github.com/PHPOffice/PhpSpreadsheet/releases/tag/2.4.8
github.com/PHPOffice/PhpSpreadsheet/releases/tag/3.10.8
github.com/PHPOffice/PhpSpreadsheet/releases/tag/5.10.0
nvd.nist.gov/vuln/detail/CVE-2026-108359
github.com/advisories/GHSA-j2w7-387v-m2rq
github.com/CVEProject/cvelistV5/tree/main/cves/2026/108xxx/CVE-2026-108359.json
github.com/PHPOffice/PhpSpreadsheet
Left out here: 14 versions. The JSON record has them.