Unbounded allocation when parsing GNU sparse map in archive/tar
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.
GO-2025-4014
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:GO-2025-4014
stdlib
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 1.24.8
Source reference:
/affected/0/ranges1.25.2Source reference:
/affected/0/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.24.8"
},
{
"introduced": "1.25.0"
},
{
"fixed": "1.25.2"
}
]
}
],
"package": {
"name": "stdlib",
"purl": "pkg:golang/stdlib",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://vuln.go.dev/ID/GO-2025-4014.json"
},
"ecosystem_specific": {
"imports": [
{
"path": "archive/tar",
"symbols": [
"Reader.Next",
"readGNUSparseMap1x0"
]
}
]
}
}
]- Related CVEs
- CVE-2025-58183
Source reference:
/aliases
Publisher severity
No explicit severity was provided.
- Event
- #67917 · Revision 1
- Added to Heist Feed
- Publisher date