CVE-2026-107214
JSON

7.5high

Excelize Decrypt: unrecoverable panics on malformed OLE/CFB encrypted workbooks

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
0.29% (higher than 23% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-2j4c-ffch-9f23GO-2026-6684

Description

Excelize is a Go language library for reading and writing Microsoft Excel spreadsheets. From 2.3.1 to 2.11.0, the decryption dispatch performs insufficient structural and parameter validation before standard and agile decryptors slice, index, allocate, and divide using attacker-controlled values. Decrypt passes attacker-controlled EncryptionInfo and EncryptedPackage data into standardDecrypt or agileDecrypt before validating the structures used by those routines. When a malformed OLE compound file with a version-valid EncryptionInfo stream is opened or passed to Decrypt, nine malformed-input classes reach unrecovered Go runtime panics instead of the documented error path, allowing an attacker to terminate the calling process. No fixed version is available as of this review.

Affected

Product or packageVersionsReported by
qax-os excelize>= 2.3.1, <= 2.11.0CVE List
github.com/xuri/excelize/v2 (Go)from 2.3.1 before 2.11.1-0.20260915055537-22f76f9acb94, before 2.11.1-0.20260915055537-22f76f9acb94GitHub Advisory Database, Go Vulnerability Database
github.com/360EntSecGroup-Skylar/excelize/v2 (Go)from 2.3.1Go Vulnerability Database
excelize excelizefrom 2.3.1 up to 2.11.0NVD

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-248

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

What each source says

CVE List

Excelize is a Go language library for reading and writing Microsoft Excel spreadsheets. From 2.3.1 to 2.11.0, the decryption dispatch performs insufficient structural and parameter validation before standard and agile decryptors slice, index, allocate, and divide using attacker-controlled values. Decrypt passes attacker-controlled EncryptionInfo and EncryptedPackage data into standardDecrypt or agileDecrypt before validating the structures used by those routines. When a malformed OLE compound file with a version-valid EncryptionInfo stream is opened or passed to Decrypt, nine malformed-input classes reach unrecovered Go runtime panics instead of the documented error path, allowing an attacker to terminate the calling process. No fixed version is available as of this review.

GitHub Advisory Database
Summary

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 inputPanicSite
1standard, len(EncryptionInfo) 4–11slice bounds [:12]crypt.go:238
2standard, attacker-controlled headerSize uint32slice bounds [12:12+headerSize] / fixed-offset header readscrypt.go:238-249
3standard, verifier remainder < 72 (AES) / 60 (RC4) bytesslice bounds in standardEncryptionVerifiercrypt.go:282-295
4standard, header.KeySize = 0xFFFFFFFFslice bounds [:536870911] with capacity 48crypt.go:321
5standard, EncryptedPackage stream missing/shortslice bounds [8:0]crypt.go:268
6agile, len(EncryptionInfo) 4–7slice bounds [8:4]crypt.go:407
7agile, valid XML without <keyEncryptors>index out of range [0] with length 0crypt.go:416, 433
8agile, saltValue decoded length ≠ AES blockcipher.NewCBCDecrypter: IV length must equal block sizecrypt.go:425 → 512
9any, keyData blockSize="0"integer divide by zerocrypt.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.)

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.

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.

Go Vulnerability Database

Excelize Decrypt: unrecoverable panics on malformed OLE/CFB encrypted workbooks in github.com/xuri/excelize

References

Sources

SourceRecordLicence
CVE ListCVE-2026-107214 changed 2026-10-07CVE Terms of Use
GitHub Advisory DatabaseGHSA-2j4c-ffch-9f23 changed 2026-10-19CC-BY-4.0
Go Vulnerability DatabaseGO-2026-6684 changed 2026-10-19CC-BY-4.0
NVDCVE-2026-107214 changed 2026-10-13Public domain