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

- Severity: High 7.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.01%, higher than 81% of CVEs (2026-12-01)
- Published: 2022-10-06T16:26:05.000Z
- Modified: 2026-09-08T08:47:48.872Z
- Also known as: GO-2022-1037, BIT-GOLANG-2022-2879
- Related: CGA-26rm-6qf5-258v
- Weaknesses: CWE-770
- Assigned by: Go

## 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.

(As written by CVE List.)

## Affected

- archive/tar: before 1.18.7; from 1.19.0-0 before 1.19.2
- stdlib (Go): before 1.18.7; from 1.19.0-0 before 1.19.2
- golang go: before 1.18.7; from 1.19.0 before 1.19.2
- golang (Bitnami): before 1.18.7; from 1.19.0 before 1.19.2

## Every score

- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Bitnami Vulnerability Database: rating High

## References

- <https://go.dev/issue/54853> (advisory, issue-tracking, report, third-party-advisory)
- <https://go.dev/cl/439355> (fix, patch)
- <https://groups.google.com/g/golang-announce/c/xtuG5faxtaU> (discussion, mailing-list, release-notes, web)
- <https://pkg.go.dev/vuln/GO-2022-1037> (advisory, vendor-advisory)
- <https://security.gentoo.org/glsa/202311-09> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-2879> (web)

## Sources

- CVE List: [CVE-2022-2879](https://www.cve.org/CVERecord?id=CVE-2022-2879), CVE Terms of Use, modified 2025-02-13
- Go Vulnerability Database: [GO-2022-1037](https://pkg.go.dev/vuln/GO-2022-1037), CC-BY-4.0, modified 2026-07-15
- NVD: [CVE-2022-2879](https://nvd.nist.gov/vuln/detail/CVE-2022-2879), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-GOLANG-2022-2879](https://osv.dev/vulnerability/BIT-GOLANG-2022-2879), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2022-2879 · Whole record: https://cve.day/CVE-2022-2879.json · Rebuilt by cve.day 2026-11-25T22:58:15.697Z
