GO-2025-4014
Unbounded allocation when parsing GNU sparse map in archive/tar
At a glance
- Published
- Updated
- CVE
- CVE-2025-58183
- Aliases
- BIT-golang-2025-58183
Description
tar.Reader does not set a maximum size on the number of sparse region data blocks in GNU tar pax 1.0 sparse files. A maliciously-crafted archive containing a large number of sparse regions can cause a Reader to read an unbounded amount of data from the archive into memory. When reading from a compressed source, a small compressed input can result in large allocations.
Affected packages
| Package | Versions |
|---|---|
| Go · stdlib | introduced 0, fixed 1.24.8, introduced 1.25.0, fixed 1.25.2 |
References
- https://go.dev/cl/709861 FIX
- https://go.dev/issue/75677 REPORT
- https://groups.google.com/g/golang-announce/c/4Emdl2iQ_bI WEB
Sources
| Source | Licence |
|---|---|
| OSV.dev | CC-BY 4.0 — Go Vulnerability Database |