6.5medium
Excelize: a row whose earlier cell has a higher column reference than its last cell panics index out of range on almost every worksheet read API
- Severity
- 6.5medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.27% (higher than 20% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-8mcq-6wmr-jrjvGO-2026-6676
Description
Excelize is a Go language library for reading and writing Microsoft Excel spreadsheets. From 2.0.0 to 2.11.0, checkRow sizes its target cell slice from the last cell in XML document order and then re-scatters every cell by its explicit column reference. GetCellValue reaches workSheetReader and checkRow, where targetList is too short for an earlier out-of-order cell. When a crafted row places a higher-column cell before a lower-column final cell and a non-streaming worksheet API reads the sheet, the earlier cell's column index exceeds the slice length derived from the final cell, allowing an attacker to cause an unrecovered panic and terminate the process. No fixed version is available as of this review.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| qax-os excelize | >= 2.0.0, <= 2.11.0 | CVE List |
| github.com/xuri/excelize/v2 (Go) | from 2.0.0 before 2.11.1-0.20260816084418-46a5eb289448, before 2.11.1-0.20260816084418-46a5eb289448 | GitHub Advisory Database, Go Vulnerability Database |
| excelize excelize | from 2.0.0 up to 2.11.0 | NVD |
All scores
| GitHub_M | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
| GitHub | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
Excelize is a Go language library for reading and writing Microsoft Excel spreadsheets. From 2.0.0 to 2.11.0, checkRow sizes its target cell slice from the last cell in XML document order and then re-scatters every cell by its explicit column reference. GetCellValue reaches workSheetReader and checkRow, where targetList is too short for an earlier out-of-order cell. When a crafted row places a higher-column cell before a lower-column final cell and a non-streaming worksheet API reads the sheet, the earlier cell's column index exceeds the slice length derived from the final cell, allowing an attacker to cause an unrecovered panic and terminate the process. No fixed version is available as of this review.
GitHub Advisory Database
Affected versions and vulnerable location
- Confirmed at
ae2113b(current HEAD). - Sink:
rows.go:967ws.SheetData.Row[rowIdx].C[colNum-1] = *colDatainsidecheckRow. checkRowcomputeslastColfrom the column of the last cell in document order (rows.go:940), allocatestargetListof that length, then re-scatters every source cell intoC[colNum-1].
Root cause
The slice is sized from the last cell's column, but cells are not required to be column-sorted in the XML. A cell that appears earlier in the row but references a higher column than the last cell has colNum-1 >= len(targetList), so the assignment writes out of range. MaxColumns/TotalRows do not help, every individual column is valid; the bug is the ordering assumption, not magnitude.
Attacker model and reachability
Any service that opens an untrusted spreadsheet and calls a worksheet API that goes through workSheetReader -> checkRow (excelize.go:332): GetCellValue, GetCellFormula, CalcCellValue, GetMergeCells, SetCellValue, and essentially every non-streaming worksheet call. (The streaming GetRows/Rows() SAX path does not trigger it.) Unauthenticated, deterministic, unrecovered panic -> process crash.
Proof of concept (executed)
Crafted xl/worksheets/sheet1.xml with a row whose cells are out of column order and whose earlier cell exceeds the last cell's column:
<row r="1"><c r="D1"><v>4</v></c><c r="C1"><v>3</v></c></row>
GetCellValue("Sheet1","A1") (via getCellStringFunc -> workSheetReader -> checkRow) panicked index out of range [3] with length 3 at rows.go:967.
Confirming grep:
rg -n "func checkRow|lastCol|Row\[rowIdx\].C\[colNum-1\]" rows.go
Suggested fix
Size targetList from the maximum cell column in the row (not the last cell in document order), or bounds-check colNum-1 against len(targetList) and grow the slice as needed before the assignment.
Go Vulnerability Database
Panic on out-of-order cell column references when reading worksheets in github.com/xuri/excelize
References
| https://github.com/qax-os/excelize/security/advisories/GHSA-8mcq-6wmr-jrjv | advisory, exploit, vendor-advisory, web | |
| https://github.com/qax-os/excelize/pull/2376 | issue-tracking, patch, web | |
| https://github.com/qax-os/excelize/commit/46a5eb289448e40fbc7d3294589b03861fb822f0 | fix, patch, web | |
| https://github.com/qax-os/excelize | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-107221 changed 2026-10-07 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-8mcq-6wmr-jrjv changed 2026-11-05 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-6676 changed 2026-11-05 | CC-BY-4.0 |
| NVD | CVE-2026-107221 changed 2026-10-13 | Public domain |