CVE-2026-107217: Excelize ColumnNameToNumber: int64 overflow yields an out-of-domain coordinate with nil error, causing negative slice index panic on r="0" rows
Summary ColumnNameToNumber (lib.go:220-237) accumulates the bijective base-26 value of a column name in an int64 with only an upper-bound check (col MaxColumns) applied after the loop and no overflow detection. A 14-letter column name whose true value is 3·2⁶⁴ — e.g. VGWQHXLSDVIKWV — wraps to col = 0 and passes the guard, so CellNameToCoordinates("VGWQHXLSDVIKWV1") returns (col=0, row=1, err=nil).
Published Oct 7, 2026
Affected packages
github.com/xuri/excelize/v2
- Ecosystem
- Go
- Affected
- >= 2.0.0, < 2.11.1-0.20260910071107-696050fbf14e
- Fixed in
- 2.11.1-0.20260910071107-696050fbf14e
- Check
go list -m github.com/xuri/excelize/v2
github.com/xuri/excelize
- Ecosystem
- Go
- Affected
- >= 1.1.0, <= 1.4.1
- 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).
Summary
ColumnNameToNumber (lib.go:220-237) accumulates the bijective base-26 value of a column name in an int64 with only an upper-bound check (col > MaxColumns) applied after the loop and no overflow detection. A 14-letter column name whose true value is 3·2⁶⁴ — e.g. `VGWQHXLSDVIKWV` — wraps to col = 0 and passes the guard, so CellNameToCoordinates("VGWQHXLSDVIKWV1") returns (col=0, row=1, err=nil).
When normalizing a r="0" row, checkSheetR0 (excelize.go:417-443, called from checkSheet at excelize.go:405) runs its checkRow closure with col = 0: colIdx := col - 1 becomes -1, and sheetData.Row[rowIdx].C[-1] (excelize.go:424) raises an unrecovered panic: runtime error: index out of range [-1], killing the host process.
Details
- The row side of the same coordinate gate is enforced (
checkRowNumat excelize.go:342-350 boundsrbefore themake([]xlsxRow, row)allocation; this includes the fix for GHSA-h69g-9hx6-f3v4 / CVE-2026-54063, present in the audited commit). The column side is not:checkSheet/lastRowNum/checkSheetR0treaterr == nilfromCellNameToCoordinatesas proof of an in-domain coordinate (excelize.go:356, :438), which is unsound because of the wrap-around above. - The same unsound gate also feeds
ws.SheetData.Row[rowIdx].C[colNum-1]inxlsxWorksheet.checkRow(rows.go:969): a row combining a valid large column (e.g.XFD1) with an overflowed column panics identically. - Reachable from any
workSheetReader-based API on an attacker-supplied worksheet:GetCellValue,GetCellFormula,SetCellValue,GetMergeCells,GetSheetDimension,GetColWidth,AddTable, etc. - Probe on pristine master:
ColumnNameToNumber("VGWQHXLSDVIKWV")returns(0, nil). - This is a distinct root cause from GHSA-h69g-9hx6-f3v4 (row-index allocation): different mechanism (int64 wrap-around → negative index, not oversized allocation), different sink, different fix.
PoC
A standalone program (public API only) was provided to the maintainer by email (3-column-overflow): it builds a workbook in memory whose xl/worksheets/sheet1.xml contains <sheetData><row r="0"><c r="VGWQHXLSDVIKWV1" t="inlineStr"><is><t>pwn</t></is></c></row></sheetData> (<1 KB of attacker XML), calls OpenReader, then GetCellValue("Sheet1", "A1") → PANIC_REPRODUCED: runtime error: index out of range [-1] on master ecd99d761fe0 (2026-09-08). With the proposed patch the same program prints NO_PANIC_BLOCKED.
Impact
A <1 KB crafted .xlsx crashes any service that opens a user-supplied spreadsheet and reads it — upload processing, mail-scanning pipelines, spreadsheet conversion endpoints. Remote, unauthenticated, no privileges.
Proposed fix
Bound the accumulated value inside the loop: check col > MaxColumns after each digit. Every digit is at least 1, so any name whose true value exceeds MaxColumns crosses the bound inside the loop, before the accumulation can wrap or overflow — this provably covers all cases, including wraps that would land back inside [1, MaxColumns]. A complete patch has been provided to the maintainer.
Credited to lmonstergg.
References
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
