CVE-2026-107212
Excelize: Unbounded row number in Rows.Columns makes GetRows and the Rows iterator loop for days
Archived. This CVE has left SubZer0's live 30-day window. Signals below are as of 2026-11-07; check the references for anything newer.
- Severity: High
- CVSS 7.5
- EPSS 0.36%
- Public exploit
- P2 · This week
Why P2: this week.
Description
### Summary A worksheet whose `<row r="...">` number is far past Excel's 1,048,576-row limit makes `File.GetRows` and the `Rows` iterator loop once for every missing row. The row limit is checked in `Rows.Next`, but not in `Rows.Columns`, which also reads `<row>` elements. A 1.5 KB file with `<row r="231999999999940">` after an ordinary first row keeps `GetRows` busy for an estimated 11 days (about 4 ns per missing row), using one CPU core and little memory. Any service that calls `GetRows` or iterates `Rows` on an uploaded workbook can be tied up by a single request. ### Details `Rows.Next` checks the row number: ```go rowNum, _ := attrValToInt("r", xmlElement.Attr) if rowNum > TotalRows { rows.err = ErrMaxRows return false } ``` But `Rows.Columns` reads the cells of the current row by consuming tokens until it reaches the *next* `<row>` element, and it sets `rows.curRow` from that element's `r` without the check (rows.go, around line 179 at 3985c1f): ```go if rowNum, rowIterator.err = attrValToInt("r", xmlElement.Attr); rowNum != 0 { rows.curRow = rowNum } ``` After that, `rows.curRow` is 231999999999940, and each later `Next()` call takes the `rows.curRow >= rows.seekRow` shortcut and returns `true` without reading any XML. `GetRows` then calls `Next()` and `Columns()` once per row number from 2 to 231999999999940. The check in `Next()` never runs, because the oversized `<row>` element was already consumed by `Columns()`. If the oversized row is the *f…
Affected products
- go github.com/xuri/excelize/v2 >= 2.1.0, < 2.11.1-0.20260930021559-01a9ff32fb3c; first patched: 2.11.1-0.20260930021559-01a9ff32fb3c
References
- GitHub security advisory GitHub
- Advisory reference GitHub
- Advisory reference GitHub
- Advisory reference GitHub
- Advisory reference GitHub