Panic when Excelize processes ZIP64 sizes (GO-2026-6679)

Panic when Excelize processes ZIP64 sizes (GO-2026-6679)

Description

When Excelize processes a crafted ZIP64 entry size, an integer conversion may produce a negative size. If this value bypasses the decompression size limit and is then used to allocate a buffer, OpenFile or OpenReader may panic.

Potential impact

A request or process that reads an uploaded spreadsheet may terminate. Vulnerable versions may encounter this issue even when a decompression size limit is configured.

Remediation

Update github.com/xuri/excelize/v2 to the fixed release, v2.11.1, or later. Also limit upload sizes and isolate document processing tasks.

Examples

The following examples show a dependency declaration in go.mod.

Before

go
require github.com/xuri/excelize/v2 v2.10.1

After

go
require github.com/xuri/excelize/v2 v2.11.1

Update go.sum, then rebuild and deploy using the fixed module.

References