Skip to main content
← All vulnerabilities
CVE-2022-2879GO-2022-1037BIT-GOLANG-2022-2879

Unbounded memory consumption when reading headers in archive/tar

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 1.18.7, 1.19.2
None on Exploit-DB, Metasploit or GitHub

Summary

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.

Timeline

  1. CVE published
  2. Record last updated

Affected versions

  • archive/tar

    fixed in 1.18.7; From 1.19.0-0 · fixed in 1.19.2

  • stdlibGo

    fixed in 1.18.7; From 1.19.0-0 · fixed in 1.19.2

References 5

go.dev

groups.google.com

pkg.go.dev

security.gentoo.org