Advisory

GO-2022-1037

Also known as: BIT-golang-2022-2879, CVE-2022-2879

Summary

Unbounded memory consumption when reading headers in archive/tar

Details

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.

Severity

Not rated by the source.

Dates

Published
2022-10-06 16:26 UTC
Modified
2026-07-15 14:29 UTC

Affected packages and fixes

stdlib

Go · All systems

Affected

  • introduced 0, fixed 1.18.7, introduced 1.19.0-0, fixed 1.19.2 (semver)

Fixed versions

1.18.7, 1.19.2

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Go Vulnerability Database · CC BY 4.0

Sources & licences