CVE-2026-107219: Excelize Unbounded SpinCount Vulnerability

HIGH
Advisory Identifier: GHSA-jrfj-fhj2-jjvm
CVSS 7.5
CWE-400
Published
Advisory Summary

CVE-2026-107219 is a HIGH (CVSS 7.5) unbounded spincount vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Excelize libraries in the Go ecosystem. The issue involves unbounded spincount in agile decryption burns cpu during openfile. Remediation is available by upgrading affected packages to version 2.11.1-0.20260906004932-2badfcd5841d.

CVE-2026-107219 at a Glance

CVE Identifier CVE-2026-107219
GHSA Identifier GHSA-jrfj-fhj2-jjvm
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Excelize
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.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:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-107219

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.

github.com/xuri/excelize/v2 fixed: 2.11.1-0.20260906004932-2badfcd5841d
Upgrade github.com/xuri/excelize/v2 to 2.11.1-0.20260906004932-2badfcd5841d
Verify Direct and Transitive Dependencies

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-107219, 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.20260906004932-2badfcd5841d), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. 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

Opening a file whose first eight bytes are the OLE magic number sends excelize down the decryption path whether or not the caller set a password, or supports encrypted workbooks at all. `openReaderAt` (excelize.go:198-215) branches on the header alone, and `agileDecrypt` calls `convertPasswdToKey` before the verifier hash is checked, so the key-derivation loop runs `spinCount` times regardless. `spinCount` (crypt.go:98) is a plain `int` filled by a bare `xml.Unmarshal` of the file's own EncryptionInfo stream. Nothing bounds it. A 3072-byte file with spinCount 100000000 makes `OpenFile` take 58.65s on v2.11.0 with default options, then return `zip: not a valid zip file`. It is linear at about 0.6 microseconds per iteration and the attacker picks the number, so 1e9 is roughly ten minutes. Nothing on the path takes a `context.Context`, so the caller cannot cancel it; in an HTTP handler the write timeout returns a response while the goroutine keeps spinning. Memory stays flat at 24 MB, so nothing reclaims it either. ``` v2.5.0 spinCount=10000000 5.307s v2.9.1 spinCount=10000000 5.444s v2.11.0 spinCount=10000000 7.529s v2.11.0 spinCount=100000000 58.654s ``` The loop arrived with `crypt.go` in v2.3.1 and is unchanged through v2.11.0. Excel and LibreOffice write spinCount 100000, which costs 61ms here, so a ceiling well above the legitimate value would cost real files nothing. This is availability only, and it is not a vulnerability for a program that only opens files its own operator produced.

CVE-2026-107219 Affected Excelize Versions

1 component(s)
Fixed Versions:
2.11.1-0.20260906004932-2badfcd5841d
Product / Package Ecosystem Affected Versions Fixed Version
github.com/xuri/excelize/v2
Go
≥ 2.3.1
< 2.11.1-0.20260906004932-2badfcd5841d
2.11.1-0.20260906004932-2badfcd5841d

References

Frequently Asked Questions

What is CVE-2026-107219?
CVE-2026-107219 is a security vulnerability in Excelize involving Unbounded spinCount in agile decryption burns CPU during OpenFile under CWE-400: Uncontrolled Resource Consumption.
Which Excelize versions are affected?
Affected versions include releases prior to 2.11.1-0.20260906004932-2badfcd5841d across affected packages: github.com/xuri/excelize/v2.
What version fixes CVE-2026-107219?
Upgrading to 2.11.1-0.20260906004932-2badfcd5841d (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/xuri/excelize/v2 affected?
Yes, github.com/xuri/excelize/v2 is affected in releases prior to 2.11.1-0.20260906004932-2badfcd5841d. Upgrade your dependency to 2.11.1-0.20260906004932-2badfcd5841d or later.
What is the CVSS score of CVE-2026-107219?
CVE-2026-107219 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-107219?
CVE-2026-107219 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Go dependencies for CVE-2026-107219?
Run the dependency tree command: 'inspect dependencies for github.com/xuri/excelize/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jrfj-fhj2-jjvm",
  "modified" : "2026-10-07T20:23:22Z",
  "published" : "2026-10-07T20:23:22Z",
  "aliases" : [ "CVE-2026-107219" ],
  "summary" : "Excelize: Unbounded spinCount in agile decryption burns CPU during OpenFile",
  "details" : "Opening a file whose first eight bytes are the OLE magic number sends excelize down the decryption path whether or not the caller set a password, or supports encrypted workbooks at all. `openReaderAt` (excelize.go:198-215) branches on the header alone, and `agileDecrypt` calls `convertPasswdToKey` before the verifier hash is checked, so the key-derivation loop runs `spinCount` times regardless.\n\n`spinCount` (crypt.go:98) is a plain `int` filled by a bare `xml.Unmarshal` of the file's own EncryptionInfo stream. Nothing bounds it.\n\nA 3072-byte file with spinCount 100000000 makes `OpenFile` take 58.65s on v2.11.0 with default options, then return `zip: not a valid zip file`. It is linear at about 0.6 microseconds per iteration and the attacker picks the number, so 1e9 is roughly ten minutes. Nothing on the path takes a `context.Context`, so the caller cannot cancel it; in an HTTP handler the write timeout returns a response while the goroutine keeps spinning. Memory stays flat at 24 MB, so nothing reclaims it either.\n\n```\nv2.5.0   spinCount=10000000   5.307s\nv2.9.1   spinCount=10000000   5.444s\nv2.11.0  spinCount=10000000   7.529s\nv2.11.0  spinCount=100000000  58.654s\n```\n\nThe loop arrived with `crypt.go` in v2.3.1 and is unchanged through v2.11.0.\n\nExcel and LibreOffice write spinCount 100000, which costs 61ms here, so a ceiling well above the legitimate value would cost real files nothing. \n\nThis is availability only, and it is not a vulnerability for a program that only opens files its own operator produced.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/xuri/excelize/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.3.1"
      }, {
        "fixed" : "2.11.1-0.20260906004932-2badfcd5841d"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/qax-os/excelize/security/advisories/GHSA-jrfj-fhj2-jjvm"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/qax-os/excelize/pull/2389"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/qax-os/excelize/commit/2badfcd5841d0d88b0ffea119f5a2f3c53b4910b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/qax-os/excelize"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-07T20:23:22Z",
    "nvd_published_at" : null
  }
}