Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/xuri/excelize/v2
  4. ›
  5. CVE-2026-107219

CVE-2026-107219: Excelize: Unbounded spinCount in agile decryption burns CPU during OpenFile

October 7, 2026

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.

References

  • github.com/advisories/GHSA-jrfj-fhj2-jjvm
  • github.com/qax-os/excelize/commit/2badfcd5841d0d88b0ffea119f5a2f3c53b4910b
  • github.com/qax-os/excelize/pull/2389
  • github.com/qax-os/excelize/security/advisories/GHSA-jrfj-fhj2-jjvm
  • nvd.nist.gov/vuln/detail/CVE-2026-107219

Code Behaviors & Features

Detect and mitigate CVE-2026-107219 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 2.3.1 before 2.11.1-0.20260906004932-2badfcd5841d

Fixed versions

  • 2.11.1-0.20260906004932-2badfcd5841d

Solution

Upgrade to version 2.11.1-0.20260906004932-2badfcd5841d or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-400: Uncontrolled Resource Consumption

Source file

go/github.com/xuri/excelize/v2/CVE-2026-107219.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:51 +0000.