GITHUB.COM/360ENTSECGROUP-SKYLAR/EXCELIZE/V2 · CVE-2026-107219 · Package
FIX → 2.11.1-0.20260906004932-2badfcd5841d
Excelize, a Go library for reading and writing Excel files, does not cap the spinCount value when decrypting password-protected agile-encrypted workbooks. A crafted encrypted file can make OpenFile consume large amounts of CPU.
first public Sep 6, 2026 · 3 sources
Check it with your coding agent
It checks your repository and tells you if you’re affected, with the fix.
Applications that open Excel files with Excelize's OpenFile, especially files supplied by users or external parties, are exposed. Projects that only generate workbooks or never open untrusted encrypted files can skip it.
Not affected if no-encrypted-workbooks, no-untrusted-files
Who cares cwe-400, excel, file-upload, go
go.mod for github.com/xuri/excelize/v2Opening 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.
Are you affected?
Tell InfraStack what you run. It checks this one, and every next one, against your stack.
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
github.com/360EntSecGroup-Skylar/excelize/v2go.modUpgrade to 2.11.1-0.20260906004932-2badfcd5841d
github.com/xuri/excelize/v2: move to 2.11.1-0.20260906004932-2badfcd5841d or latergithub.com/360EntSecGroup-Skylar/excelize/v2: no fixed version is listed in the sourcesv2.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.
This page as .md · .json · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Go Vulnerability Database, CC-BY 4.0 · NVD data is provided by NIST and is public domain · GitHub Advisory Database, CC-BY 4.0. Posts quoted belong to their authors.