Skip to content

archive/tar: unbounded allocation when parsing GNU sparse map (CVE-2025-58183) #75677

@neild

Description

@neild

tar.Reader did 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 could 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 could result in large allocations.

Thanks to Harshit Gupta (Mr HAX) - https://www.linkedin.com/in/iam-harshit-gupta/ for reporting this issue.

This is CVE-2025-58183 and Go issue https://go.dev/issue/75677.


This is a PRIVATE issue for CVE-2025-58183, tracked in http://b/440100289 and fixed by https://go-internal-review.git.corp.google.com/c/go/+/2800.

/cc @golang/security and @golang/release

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsFixThe path to resolution is known, but the work has not been done.Securityrelease-blocker

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions