CVE-2022-2879
Unbounded memory consumption when reading headers in archive/tar
Reported by go · Published October 14, 2022
archive/tar is fixed in 1.19.2 and 1.18.7 (Go Modules)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| archive/tar | Go Modules | 1.19.2, 1.18.7 |
| stdlib | Go Modules | 1.19.2, 1.18.7 |
| golang-misc | Amazon Linux | 1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1 |
| golang-shared | Amazon Linux | 1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1 |
| golang-docs | Amazon Linux | 1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1 |
| golang-src | Amazon Linux | 1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1 |
| golang | Amazon Linux | 1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1 |
| golang-bin | Amazon Linux | 1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1 |
| golist | Amazon Linux | 0.10.1-11.amzn2023.0.3, 0.10.1-10.amzn2.0.2 |
| golang-race | Amazon Linux | 1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1 |
| golang-tests | Amazon Linux | 1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1 |
| golang | Bitnami | 1.19.2, 1.18.7 |
5 more packages have a fixed version. See every fix in Lookup.
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Go standard library | archive/tar | 0, 1.19.0-0 |
| amazon:2023 | golang-misc | 0 |
| amazon:2023 | golang-shared | 0 |
| amazon:2023 | golang-docs | 0 |
| Go standard library | archive/tar | 1.19.0-0, 0 |
| amazon:2023 | golang-src | 0 |
| amazon:2023 | golang | 0 |
| amazon:2 | golang-bin | 0 |
| amazon:2 | golang-src | 0 |
| amazon:2 | golang | 0 |
| amazon:2 | golist | 0 |
| amazon:2023 | golang-race | 0 |
| amazon:2 | golang-docs | 0 |
| amazon:2 | golang-shared | 0 |
| amazon:2 | golang-tests | 0 |
| amazon:2023 | golist | 0 |
| amazon:2 | golang-misc | 0 |
| amazon:2023 | golang-tests | 0 |
| amazon:2023 | golang-bin | 0 |
| amazon:2 | golang-race | 0 |
…and 3 more
Timeline
- Oct 6, 2022 CVE Published
- Oct 15, 2022 EPSS Score (30 in total, the first dated here)
- Nov 21, 2024 CVE Updated
- Mar 10, 2026 Security Advisory (82 in total, the first dated here)
- Jun 27, 2026 Coalition ESS Score
- Jul 2, 2026 Distribution Patch (78 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2022-2879
vulnetix vdb fixes CVE-2022-2879
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-2879/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart