CVE-2026-107221: Excelize A Row Whose Earlier Cell Vulnerability
MODERATECVE-2026-107221 is a MODERATE (CVSS 6.5) a row whose earlier cell vulnerability (CWE-787: Out-of-bounds Write) affecting Excelize libraries in the Go ecosystem. The issue involves 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. Remediation is available by upgrading affected packages to version 2.11.1-0.20260816084418-46a5eb289448.
CVE-2026-107221 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-107221
To remediate this vulnerability, upgrade all affected Excelize dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/xuri/excelize/v2 to 2.11.1-0.20260816084418-46a5eb289448
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/xuri/excelize/v2
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-107221, inspect your project dependencies for Excelize:
inspect dependencies for github.com/xuri/excelize/v2
Analyze the terminal output to locate any version of Excelize in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.11.1-0.20260816084418-46a5eb289448), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-787: Out-of-bounds Write, where the product writes data past the end, or before the beginning, of the intended buffer. In Excelize, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-107221 Affected Excelize Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/xuri/excelize/v2
|
Go |
≥ 2.0.0
< 2.11.1-0.20260816084418-46a5eb289448
|
2.11.1-0.20260816084418-46a5eb289448
|
References
Frequently Asked Questions
What is CVE-2026-107221?
Which Excelize versions are affected?
What version fixes CVE-2026-107221?
Is github.com/xuri/excelize/v2 affected?
What is the CVSS score of CVE-2026-107221?
What CWE is associated with CVE-2026-107221?
How can I check Go dependencies for CVE-2026-107221?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8mcq-6wmr-jrjv",
"modified" : "2026-10-07T20:23:08Z",
"published" : "2026-10-07T20:23:08Z",
"aliases" : [ "CVE-2026-107221" ],
"summary" : "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",
"details" : "## Affected versions and vulnerable location\n\n- Confirmed at `ae2113b` (current HEAD).\n- Sink: `rows.go:967` `ws.SheetData.Row[rowIdx].C[colNum-1] = *colData` inside `checkRow`.\n- `checkRow` computes `lastCol` from the column of the last cell in document order (`rows.go:940`), allocates `targetList` of that length, then re-scatters every source cell into `C[colNum-1]`.\n\n## Root cause\n\nThe 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.\n\n## Attacker model and reachability\n\nAny 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.\n\n## Proof of concept (executed)\n\nCrafted `xl/worksheets/sheet1.xml` with a row whose cells are out of column order and whose earlier cell exceeds the last cell's column:\n\n```xml\n<row r=\"1\"><c r=\"D1\"><v>4</v></c><c r=\"C1\"><v>3</v></c></row>\n```\n\n`GetCellValue(\"Sheet1\",\"A1\")` (via `getCellStringFunc -> workSheetReader -> checkRow`) panicked `index out of range [3] with length 3` at `rows.go:967`.\n\nConfirming grep:\n\n```bash\nrg -n \"func checkRow|lastCol|Row\\[rowIdx\\].C\\[colNum-1\\]\" rows.go\n```\n\n## Suggested fix\n\nSize `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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/xuri/excelize/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.11.1-0.20260816084418-46a5eb289448"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/qax-os/excelize/security/advisories/GHSA-8mcq-6wmr-jrjv"
}, {
"type" : "WEB",
"url" : "https://github.com/qax-os/excelize/pull/2376"
}, {
"type" : "WEB",
"url" : "https://github.com/qax-os/excelize/commit/46a5eb289448e40fbc7d3294589b03861fb822f0"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/qax-os/excelize"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-787" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-07T20:23:08Z",
"nvd_published_at" : null
}
}