Summary
Excelize Decrypt: unrecoverable panics on malformed OLE/CFB encrypted workbooks
Any file whose first 8 bytes are the OLE compound-file signature (D0 CF 11 E0 A1 B1 1A E1) is routed by OpenFile/OpenReader/OpenBytes → openReaderAt → Decrypt. The version dispatch only guarantees len(EncryptionInfo) >= 4 before handing attacker-controlled EncryptionInfo/EncryptedPackage buffers to standardDecrypt/agileDecrypt, and no callee validates structure. Malformed but version-valid content therefore fails as an unrecovered runtime panic instead of an error, terminating the calling process.
Details
All panic classes below were execution-confirmed against pristine master (ecd99d761fe0, 2026-09-08). excelize.go:211-213 maps Decrypt errors to ErrWorkbookFileFormat, but panics bypass that path and kill the process.
| # | Malformed input | Panic | Site |
|---|---|---|---|
| 1 | standard, len(EncryptionInfo) 4–11 |
slice bounds [:12] |
crypt.go:238 |
| 2 | standard, attacker-controlled headerSize uint32 |
slice bounds [12:12+headerSize] / fixed-offset header reads |
crypt.go:238-249 |
| 3 | standard, verifier remainder < 72 (AES) / 60 (RC4) bytes | slice bounds in standardEncryptionVerifier |
crypt.go:282-295 |
| 4 | standard, header.KeySize = 0xFFFFFFFF |
slice bounds [:536870911] with capacity 48 |
crypt.go:321 |
| 5 | standard, EncryptedPackage stream missing/short |
slice bounds [8:0] |
crypt.go:268 |
| 6 | agile, len(EncryptionInfo) 4–7 |
slice bounds [8:4] |
crypt.go:407 |
| 7 | agile, valid XML without <keyEncryptors> |
index out of range [0] with length 0 |
crypt.go:416, 433 |
| 8 | agile, saltValue decoded length ≠ AES block |
cipher.NewCBCDecrypter: IV length must equal block size |
crypt.go:425 → 512 |
| 9 | any, keyData blockSize="0" |
integer divide by zero | crypt.go:539 |
Note the asymmetry pinpointing the missing constraint: the agile path already checks len(EncryptedPackage) >= 8 (crypt.go:520-523) but the standard path does not (#5). Existing tests only cover the error paths (short <4 bytes → ErrUnknownEncryptMechanism, bad XML, base64 errors), never these panic paths.
PoC
Standalone programs (public API only, inputs built in memory) were provided to the maintainer by email: 1-decrypt-panic builds seven malformed CFB containers and shows each panic escaping the public Decrypt API plus one end-to-end OpenReader crash. All cases print PANIC on master and BLOCKED with the proposed patch. A regression guard proves legitimate decryption is unaffected: a workbook encrypted with the package's own Encrypt() still opens through the same code path.
(A separate advisory covers the unbounded/negative allocation in extractPart.)
Proposed fix
A recover() boundary in Decrypt mapping any panic to ErrWorkbookFileFormat (restores the documented error-routing contract; legitimate standard/agile decryption unaffected). A complete patch has been provided to the maintainer; per-site length validation is recommended as defense in depth.
Impact
Any service that calls OpenFile/OpenReader/OpenBytes on untrusted input (upload processing, mail scanning, spreadsheet conversion) can be killed remotely and without authentication by a file of ~100 bytes to ~3 KB. No password is required, panics occur during structural/parameter handling before successful decryption. Site variety means filtering one pattern does not help.
CVE-2026-107214 has a CVSS score of 7.5 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.11.1-0.20260915055537-22f76f9acb94); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-107214? CVE-2026-107214 is a high-severity security vulnerability in github.com/xuri/excelize/v2 (go), affecting versions >= 2.3.1, < 2.11.1-0.20260915055537-22f76f9acb94. It is fixed in 2.11.1-0.20260915055537-22f76f9acb94.
- How severe is CVE-2026-107214? CVE-2026-107214 has a CVSS score of 7.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of github.com/xuri/excelize/v2 are affected by CVE-2026-107214? github.com/xuri/excelize/v2 (go) versions >= 2.3.1, < 2.11.1-0.20260915055537-22f76f9acb94 is affected.
- Is there a fix for CVE-2026-107214? Yes. CVE-2026-107214 is fixed in 2.11.1-0.20260915055537-22f76f9acb94. Upgrade to this version or later.
- Is CVE-2026-107214 exploitable, and should I be worried? Whether CVE-2026-107214 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-107214 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-107214? Upgrade
github.com/xuri/excelize/v2to 2.11.1-0.20260915055537-22f76f9acb94 or later.