VDB
Sign up
HIGH7.5

GO-2022-1037

Unbounded memory consumption when reading headers in archive/tar

Quick fix

GO-2022-1037 — stdlib: upgrade to the fixed version with the command below.

go get stdlib@v1.18.7

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.

Are you affected?

Enter the version of the package you're using.

Affected packages

Go/stdlib
Introduced in: 0Fixed in: 1.18.7
Fixgo get stdlib@v1.18.7

References