{"id":"CVE-2022-2879","state":"PUBLISHED","title":"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.","publishedAt":"2022-10-14T00:00:00.000Z","updatedAt":"2025-02-13T16:32:38.510Z","severity":null,"assigner":"Go","products":["Go standard library archive/tar"],"affected":[{"vendor":"Go standard library","product":"archive/tar","packageName":"archive/tar","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.18.7","versionType":"semver"},{"version":"1.19.0-0","status":"affected","lessThan":"1.19.2","versionType":"semver"}],"collectionURL":"https://pkg.go.dev","programRoutines":[{"name":"Reader.next"},{"name":"parsePAX"},{"name":"Writer.writePAXHeader"},{"name":"Reader.Next"},{"name":"Writer.WriteHeader"}]}],"references":["https://go.dev/issue/54853","https://go.dev/cl/439355","https://groups.google.com/g/golang-announce/c/xtuG5faxtaU","https://pkg.go.dev/vuln/GO-2022-1037","https://security.gentoo.org/glsa/202311-09"],"weaknesses":[],"ingestedAt":"2026-10-29T19:50:01.354Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/2xxx/CVE-2022-2879.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2022-2879","state":"PUBLISHED","datePublished":"2022-10-14T00:00:00.000Z","dateUpdated":"2025-02-13T16:32:38.510Z","assignerShortName":"Go","assignerOrgId":"1bb62c36-49e3-4200-9d77-64a1400537cc","dateReserved":"2022-08-17T00:00:00.000Z"},"containers":{"cna":{"title":"Unbounded memory consumption when reading headers in archive/tar","descriptions":[{"lang":"en","value":"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":[{"vendor":"Go standard library","product":"archive/tar","packageName":"archive/tar","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.18.7","versionType":"semver"},{"version":"1.19.0-0","status":"affected","lessThan":"1.19.2","versionType":"semver"}],"collectionURL":"https://pkg.go.dev","programRoutines":[{"name":"Reader.next"},{"name":"parsePAX"},{"name":"Writer.writePAXHeader"},{"name":"Reader.Next"},{"name":"Writer.WriteHeader"}]}],"references":[{"url":"https://go.dev/issue/54853"},{"url":"https://go.dev/cl/439355"},{"url":"https://groups.google.com/g/golang-announce/c/xtuG5faxtaU"},{"url":"https://pkg.go.dev/vuln/GO-2022-1037"},{"url":"https://security.gentoo.org/glsa/202311-09"}],"problemTypes":[{"descriptions":[{"lang":"en","description":"CWE 400: Uncontrolled Resource Consumption"}]}],"providerMetadata":{"shortName":"Go","orgId":"1bb62c36-49e3-4200-9d77-64a1400537cc","dateUpdated":"2023-11-25T11:10:09.147Z"},"credits":[{"lang":"en","value":"Adam Korczynski (ADA Logics)"},{"lang":"en","value":"OSS-Fuzz"}]},"adp":[{"title":"CVE Program Container","references":[{"url":"https://go.dev/issue/54853","tags":["x_transferred"]},{"url":"https://go.dev/cl/439355","tags":["x_transferred"]},{"url":"https://groups.google.com/g/golang-announce/c/xtuG5faxtaU","tags":["x_transferred"]},{"url":"https://pkg.go.dev/vuln/GO-2022-1037","tags":["x_transferred"]},{"url":"https://security.gentoo.org/glsa/202311-09","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-03T00:52:59.498Z"}}]}}}