CVE-2022-2879

published 14 Oct 2022 · updated 16 Nov 2026

Unbounded memory consumption when reading headers in archive/tar

7.5HighCVSS 7.5EPSS 2%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 2%. Fixed in 1.18.7 and 1.19.2.

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

Vendors, products and packages with version ranges

VendorProductVersionsFixed
Go standard library<1.18.7, >=1.19.0-0 <1.19.21.18.7, 1.19.2

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2022-2879 severity on Zeptric[![CVE-2022-2879](https://zeptric.io/badge/cve/CVE-2022-2879.svg)](https://zeptric.io/cve/CVE-2022-2879)