Go
CVE-2026-116591
compress zstd: Panic on two-block frames
- Severity
- High
- Published
- 27 Oct 2026
- Last changed
- 5 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 1.20.2
- Exploit chance
- 0.5% in the next 30 daysHigher than 45% of CVEs. EPSS by FIRST, 24 Nov 2026
- Weakness
- Integer overflow (CWE-190)
- Also known as
- GHSA-fpmh-frq8-7rj8, GO-2026-6865
- Sources
- OSV.dev and GitHub
Description
A crafted ~27 KB two-block zstd frame makes DecodeAll and the streaming decoder panic with an out-of-range slice index instead of returning a decode error. The same bytes decode fine with the reference zstd. Any program that decompresses untrusted zstd input can be crashed by it. Reproduced on v1.20.0 and v1.20.1.
Released in https://github.com/klauspost/compress/releases/tag/v1.20.2
The panic is in the FSE decoder that huff0.ReadTable uses to read a block's Huffman-weight table. Three conditions have to hold at once, and the crafted frame arranges all three.
1. A count that doesn't fit is accepted. readNCount permits a tableLog up to 15 (tablelogAbsoluteMax, checked at fse/decompress.go:54), so a symbol's normalized count can reach 32768 (2^15). The count is stored in an int16 at fse/decompress.go:126, where 32768 wraps to −32768. The validation only looks at the int32 running totals (remaining and gotTotal), which still match, so the bad value passes.
Affected software
| Software | Affected versions |
|---|---|
github.com/klauspost/compress/zstdGo · osv:Go:github.com/klauspost/compress/zstd |
|
About github.com/klauspost/compress/zstd
This is the only vulnerability in github.com/klauspost/compress/zstd in our list.
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-116591
- GitHub Advisory Database https://github.com/advisories/GHSA-fpmh-frq8-7rj8