---
id: CVE-2025-58183
title: >-
  tar.Reader does not set a maximum size on the number of sparse region data
  blocks in GNU tar pax 1.0 sparse files
summary: >-
  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 o…
severity: medium
cvss: 4.3
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L'
vendor: stdlib
product: stdlib
affected:
  - 'stdlib >= 1.25.0, < 1.25.2'
patched:
  - stdlib 1.25.2
published: '2025-10-29'
updated: '2026-10-08'
sourceUpdated: '2026-10-08T10:10:00.227'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2025-58183'
references:
  - url: 'https://go.dev/cl/709861'
    label: security@golang.org
  - url: 'https://go.dev/issue/75677'
    label: security@golang.org
  - url: 'https://groups.google.com/g/golang-announce/c/4Emdl2iQ_bI'
    label: security@golang.org
  - url: 'https://pkg.go.dev/vuln/GO-2025-4014'
    label: security@golang.org
  - url: 'http://www.openwall.com/lists/oss-security/2025/10/08/1'
    label: af854a3a-2127-422b-91ae-364da2661108
tags:
  - nvd
  - osv
  - go
epss: 0.00443
epssPercentile: 0.38315
aliases:
  - GO-2025-4014
  - BIT-golang-2025-58183
ecosystem: go
ingestedAt: '2026-07-23T19:05:54.007Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2025-58183)

Affected packages:

- `stdlib >= 1.25.0, < 1.25.2`

Patched in:

- `stdlib 1.25.2`

Source: https://osv.dev/vulnerability/GO-2025-4014
