CVE-2026-108359
PhpSpreadsheet ODS Reader: Unbounded number-rows-repeated → CPU & Memory Exhaustion (DoS)
Archived. This CVE has left SubZer0's live 30-day window. Signals below are as of 2026-11-26; check the references for anything newer.
- Severity: High
- CVSS 8.7
- EPSS 0.71%
- Public exploit
- P2 · This week
Why P2: this week.
Description
## 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`: ```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 ... } ``` **…
Affected products
- composer phpoffice/phpspreadsheet <= 1.30.6; first patched: 1.30.7
- composer phpoffice/phpspreadsheet >= 2.0.0, <= 2.1.18; first patched: 2.1.19
- composer phpoffice/phpspreadsheet >= 2.2.0, <= 2.4.7; first patched: 2.4.8
- composer phpoffice/phpspreadsheet >= 3.3.0, <= 3.10.7; first patched: 3.10.8
- composer phpoffice/phpspreadsheet >= 4.0.0, <= 5.9.0; first patched: 5.10.0
References
- GitHub security advisory GitHub
- Advisory reference GitHub
- Advisory reference GitHub
- Advisory reference GitHub
- Advisory reference GitHub
- Advisory reference GitHub
- Advisory reference GitHub
- Advisory reference GitHub
- Advisory reference GitHub
- Advisory reference GitHub
- Advisory reference GitHub
- Advisory reference GitHub