Categories
CVE-2026-107221 medium CVSS 6.5

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:967 ws.SheetData.Row[rowIdx].C[colNum-1] = *colData inside checkRow.
  • 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].

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.

❓ What is the problem

Out-of-bounds write (CWE-787) exists in github.com/xuri/excelize/v2. Attackers reach the vulnerable code path via ae2113b without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of github.com/xuri/excelize/v2. Attack surface: ae2113b / checkRow / lastCol / targetList.

🔥 Severity

Severity: Medium (CVSS 6.5/10). Risk of unauthorized operations or information disclosure.

🔧 How to fix

Update to 2.11.1-0.20260816084418-46a5eb289448.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

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

  1. 1
    Identify 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 し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade github.com/xuri/excelize/v2 to 2.11.1-0.20260816084418-46a5eb289448

    ステージング環境で 2.11.1-0.20260816084418-46a5eb289448 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

go github.com/xuri/excelize/v2
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.11.1-0.20260816084418-46a5eb289448"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details