CVE-2026-59161: Excelize: Streaming GetRows row-bound bypass causes attacker-controlled allocation
Streaming GetRows row-bound bypass causes attacker-controlled allocation Summary Excelize's prior row-bound fix for GHSA-h69g / CVE-2026-54063 protects the checked worksheet parser, but the streaming worksheet reader used by Rows and GetRows does not enforce the same TotalRows bound on the row r attribute. A small XLSX file can set a row number above Excelize's maximum row (1048576) and omit the cell coordinate.
Published Sep 10, 2026
Affected packages
github.com/xuri/excelize/v2
- Ecosystem
- Go
- Affected
- < 2.11.0
- Fixed in
- 2.11.0
- Check
go list -m github.com/xuri/excelize/v2
github.com/xuri/excelize
- Ecosystem
- Go
- Affected
- <= 1.4.0
- Fixed in
- No patched version yet
- Check
go list -m github.com/xuri/excelize
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Streaming GetRows row-bound bypass causes attacker-controlled allocation
Summary
Excelize's prior row-bound fix for GHSA-h69g / CVE-2026-54063 protects the checked worksheet parser, but the streaming worksheet reader used by Rows and GetRows does not enforce the same TotalRows bound on the row r attribute. A small XLSX file can set a row number above Excelize's maximum row (1048576) and omit the cell coordinate. GetRows then appends empty rows up to the attacker-controlled row index and returns success.
This was reproduced on the current default branch commit 1213a8bd7c5ab360554603ac5c995ccaf6eb4314 and the latest release tag v2.10.1 (5ad5ab3af0054c55bdce09f1530085600e9f2e45).
Affected package
- Package:
github.com/xuri/excelize/v2 - Tested affected versions: current default branch at
1213a8bd7c5ab360554603ac5c995ccaf6eb4314, and releasev2.10.1 - Fixed version: none known at the time of this report
Impact
An attacker who can provide an XLSX file to an application that calls GetRows can cause memory and CPU usage to scale with an attacker-controlled row number, even though the file itself is tiny. This is an availability issue and appears to be an incomplete coverage variant of the GHSA-h69g row-index allocation class.
In the conservative PoC, row r="2000000" returned a [][]string with length 2,000,000 and allocated about 46 MB. Larger row numbers scale the allocation further.
Root cause
The checked parser path validates row numbers:
excelize.go:checkRowNum(r int)rejects negative rows and rows greater thanTotalRows.excelize.go:checkSheet()callscheckRowNum(r.R)before allocating sheet rows.workSheetReader()invokescheckSheet()/checkRow()before returning a cached worksheet.
The streaming path does not use that checked parser:
rows.go:Rows(sheet)opens an XML decoder directly.Rows.Next()accepts the rowrattribute and assigns it to the iterator's current row without applyingcheckRowNum().Rows.Columns()also assigns rowrto the iterator state without applyingcheckRowNum().GetRows()appends empty row slices for the gap between the previous row and the current row.
Because a cell without an r coordinate can still contain a value, the worksheet can avoid cell-coordinate row validation while still causing GetRows() to materialize rows up to the out-of-range row number.
Minimal worksheet payload
<?xml version="1.0" encoding="UTF-8"?>
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<sheetData>
<row r="2000000"><c t="s"><v>0</v></c></row>
</sheetData>
</worksheet>The workbook also contains a normal sharedStrings.xml with one string (ok).
Reproduction
A minimal Go harness creates the XLSX in memory and calls GetRows("Sheet1"):
rows, err := f.GetRows("Sheet1")
fmt.Println("rows_len:", len(rows))
if len(rows) > 0 {
fmt.Println("last_row:", rows[len(rows)-1])
}
fmt.Printf("returned error: %T %v\n", err, err)Observed output on current default branch commit 1213a8bd7c5ab360554603ac5c995ccaf6eb4314:
== streaming GetRows row r=2000000 cell without r ==
rows_len: 2000000
last_row: [ok]
returned error: <nil> <nil>
elapsed=21ms alloc_delta=46MBObserved output on latest release tag v2.10.1:
== streaming GetRows row r=2000000 cell without r ==
rows_len: 2000000
last_row: [ok]
returned error: <nil> <nil>
elapsed=14ms alloc_delta=46MBA control using the checked parser with row r="1048577" and c r="A1048577" correctly returns row number exceeds maximum limit, confirming this report is about inconsistent enforcement in the streaming path rather than a missing global constant.
Expected behavior
Rows / GetRows should reject row numbers greater than TotalRows with the same error behavior as the checked parser path.
Suggested remediation
- Apply the same row-bound validation in the streaming reader immediately after parsing a row
rattribute. - Preserve and return row parsing errors from
GetRows()instead of silently continuing or returning onlyRows.Close()errors. - Add regression tests for
GetRows()on a worksheet containingrow r="1048577"with a cell value but no cellrcoordinate.
Credited to DavidCarliez.
References
- https://github.com/qax-os/excelize/security/advisories/GHSA-q5j5-6p94-4gwc
- https://nvd.nist.gov/vuln/detail/CVE-2026-59161
- https://github.com/qax-os/excelize/pull/2331
- https://github.com/qax-os/excelize/commit/93f0b3caed37f21ef5079e3259c6c21dcfe68453
- https://github.com/qax-os/excelize/releases/tag/v2.11.0
- https://github.com/advisories/GHSA-q5j5-6p94-4gwc
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-107211
Excelize: Unchecked pivot-cache field index in extractPivotTableFields causes unrecoverable panic
high8.7Oct 8, 2026CVE-2026-107212
Excelize: Unbounded row number in Rows.Columns makes GetRows and the Rows iterator loop for days
high7.5Oct 8, 2026CVE-2026-107213
Excelize: Nil-pointer dereference in GetSlicers when a worksheet has extLst present but no drawing element
high8.7Oct 8, 2026CVE-2026-107214
Excelize Decrypt: unrecoverable panics on malformed OLE/CFB encrypted workbooks
high7.5Oct 8, 2026CVE-2026-107215
Excelize: extractPart allocates attacker-controlled, unbounded and negative-sized buffers from CFB directory entries: remote panic / OOM DoS
high7.5Oct 8, 2026CVE-2026-107216
Excelize ANCHORARRAY: mutually-referencing array formulas recurse unboundedly via re-entrant CalcCellValue, causing a fatal stack overflow
high7.5Oct 8, 2026
