CVE-2022-2879
HIGH7.5EPSS 0.02%Unbounded memory consumption when reading headers in archive/tar
Published: 10/6/2022Modified: 4/28/2026
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 packages (4)
- Bitnami/golangfrom 0, < 1.18.7, >= 1.19.0, < 1.19.2
- Debian/golang-1.15from 0
- Debian/golang-1.19from 0, < 1.19.2-1
- Go/stdlibfrom 0, < 1.18.7, >= 1.19.0-0, < 1.19.2
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | HIGH7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
References (7)
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2022-2879
- PATCHhttps://go.dev/cl/439355
- REPORThttps://go.dev/issue/54853
- WEBhttps://groups.google.com/g/golang-announce/c/xtuG5faxtaU
- WEBhttps://nvd.nist.gov/vuln/detail/CVE-2022-2879
- WEBhttps://pkg.go.dev/vuln/GO-2022-1037
- WEBhttps://security.gentoo.org/glsa/202311-09