Out-of-Bounds Write in github.com/xuri/excelize/v2 (CVE-2026-107221)
Summary
Out-of-bounds write in github.com/xuri/excelize/v2 (CVE-2026-107221). Risk of unauthorized operations or information disclosure. Exploitable via ae2113b. Mitigation: upgrade to 2.11.1-0.20260816084418-46a5eb289448 or later.
Original description
The description as published by the source.
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:
43
GetCellValue("Sheet1","A1") (via `getCellStringFunc -> workSheetReader -> checkRow…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-107221 has been found in github.com/xuri/excelize/v2.
Attackers can target a specific entry point like ae2113b over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 6.5/10.
What to do: upgrade github.com/xuri/excelize/v2 to 2.11.1-0.20260816084418-46a5eb289448 or later.
If unsure, ask your IT team or search "github.com/xuri/excelize/v2 CVE-2026-107221" on the vendor's site.
CVE-2026-107221 (github.com/xuri/excelize/v2) — CWE-787 / CVSS v3 6.5
Attack vector: remote (network-reachable) / unauthenticated
Attack surface: ae2113b / checkRow / lastCol / targetList
Patched: 2.11.1-0.20260816084418-46a5eb289448 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Out-of-bounds write (CWE-787) exists in github.com/xuri/excelize/v2. Attackers reach the vulnerable code path via ae2113b without authentication.
Check the vendor advisory for the affected versions of github.com/xuri/excelize/v2. Attack surface: ae2113b / checkRow / lastCol / targetList.
Severity: Medium (CVSS 6.5/10). Risk of unauthorized operations or information disclosure.
Update to 2.11.1-0.20260816084418-46a5eb289448.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'github.com/xuri/excelize/v2' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'github.com/xuri/excelize/v2' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
github.com/xuri/excelize/v2を grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade github.com/xuri/excelize/v2 to 2.11.1-0.20260816084418-46a5eb289448ステージング環境で 2.11.1-0.20260816084418-46a5eb289448 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- exploit github.com
- patch security-advisories@github.com
- patch security-advisories@github.com
- web github.com