What’s Vulnerable › Vulnerabilities
CVE-2022-2879: Unbounded memory consumption when reading headers in archive/tar
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 2.0% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2022-10-14 · updated 2026-06-17
- Weakness: CWE-770
Description
Reader.Read does not set a limit on the maximum size of file headers. A maliciously crafted archive could cause Read to allocate unbounded amounts of memory, potentially causing resource exhaustion or panics. After fix, Reader.Read limits the maximum size of header blocks to 1 MiB.
Affected products
- Go: before 1.18.7; from 1.19.0 before 1.19.2 — fixed in 1.18.7, 1.19.2
How to fix
Upgrade to a fixed version: Go 1.18.7, 1.19.2. Check the vendor advisory for mitigations.
References
- https://go.dev/cl/439355
- https://go.dev/issue/54853
- https://groups.google.com/g/golang-announce/c/xtuG5faxtaU
- https://pkg.go.dev/vuln/GO-2022-1037
- https://security.gentoo.org/glsa/202311-09
- https://go.dev/cl/439355
- https://go.dev/issue/54853
- https://groups.google.com/g/golang-announce/c/xtuG5faxtaU
- https://pkg.go.dev/vuln/GO-2022-1037
- https://security.gentoo.org/glsa/202311-09
Get alerted when CVE-2022-2879 or the next vulnerability affects your stack