What’s Vulnerable › Vulnerabilities

CVE-2022-2879: Unbounded memory consumption when reading headers in archive/tar

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

How to fix

Upgrade to a fixed version: Go 1.18.7, 1.19.2. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2022-2879 or the next vulnerability affects your stack