# CVE-2025-58183: Unbounded allocation when parsing GNU sparse map in archive/tar

> A maliciously crafted tar archive can cause unbounded memory allocation, leading to denial of service in applications using the Go archive/tar package.

- **Severity:** Medium 4.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 29 Oct 2025
- **Updated:** 4 Nov 2025
- **Also known as:** ALSA-2025:21815, ALSA-2025:21816, ALSA-2025:23087, ALSA-2025:23088, ALSA-2025:23294, ALSA-2025:23295, ALSA-2025:23325, ALSA-2025:23326, ALSA-2025:23948, ALSA-2026:1377, ALSA-2026:1380, ALSA-2026:1381, ALSA-2026:1837, ALSA-2026:1838, AZL-68991, AZL-68994, AZL-68999, AZL-69002, AZL-69005, AZL-69033, AZL-69036, AZL-69134, AZL-69137, AZL-69200, AZL-69251, AZL-69296, AZL-69302, AZL-69362, AZL-78907, AZL-98694, BELL-CVE-2025-58183, BIT-golang-2025-58183, CLEANSTART-2026-LO15430, CLEANSTART-2026-NO33233, CLEANSTART-2026-RU56468, CLEANSTART-2026-SE28304, CLSA-2025-1764331947, CLSA-2025-1765293700, CLSA-2025-1765379708, CLSA-2025-1765985189, CLSA-2025-1765987793, CLSA-2025-1766137892, CLSA-2025-1766232861, CLSA-2025-1766502928, DEBIAN-CVE-2025-58183, ECHO-fc4a-06a9-746f, GHSA-9gcr-gp5f-jw27, GO-2025-4014, MINI-22g9-2466-6jpw, MINI-22rw-j4c9-43qj, MINI-2368-2484-g2mr, MINI-2374-6rh6-jhf2, MINI-272h-6grp-9987, MINI-277j-r7fh-9rxp, MINI-2982-p8wx-cfcm, MINI-29vr-j475-v3fw, MINI-2cc6-j7wj-5xjx, MINI-2g3p-pg2w-5fcq, MINI-2m65-rxpq-x27p, MINI-2xc4-v339-72c7, MINI-333p-qqvm-4qwj, MINI-33w4-w225-4rqr, MINI-33xx-w3qv-3j8x, MINI-34q3-2c9f-q9r7, MINI-36m5-2mjm-vx2j, MINI-394g-26jf-hv9p, MINI-3g8f-6qw3-m5q2, MINI-3m62-7j23-xxp8, MINI-3mx6-2425-qqg5, MINI-3p3h-f97p-wj2r, MINI-3qp2-p6v9-jgx8, MINI-3r65-xxm7-8mx8, MINI-3v56-rg3r-wpv7, MINI-423p-xcmm-4w8r, MINI-457r-wqrm-hjf6, MINI-468r-rh6w-4737, MINI-46fm-h434-7qv9, MINI-4783-pp5f-fjj5, MINI-487v-mj33-wv2w, MINI-4fc5-27ww-8f63, MINI-4grf-q9ww-hw8g, MINI-4jch-224p-m4c8, MINI-4p9v-mhgf-vhxp, MINI-4pv6-cg2f-qr7w, MINI-4rvx-hxvw-fw55, MINI-4v3c-q8p7-vphr, MINI-4v65-55p6-cwq9, MINI-4x53-vx83-fqvj, MINI-5698-hrmg-65xj, MINI-56gv-r6c8-xwvc, MINI-59fr-gm68-3537, MINI-59p7-f9qm-p56x, MINI-5f7p-2qhg-7x32, MINI-5hcg-cgj9-7g26, MINI-5hj7-7rwv-m542, MINI-5hxr-mpm7-3ccw, MINI-5jr4-m28w-695f, MINI-5jw7-fmc8-vj65, MINI-5m6r-9x5j-v3jp, MINI-5m9q-56rw-g5rw, MINI-5mmm-64pp-9xhq, MINI-5q8x-rrg6-hgpq, MINI-5qj8-37f4-x8vw, MINI-5qpp-vj33-p883, MINI-5rgw-8jxc-rmq6, MINI-5xh5-jhg7-rj6r, MINI-62j7-vvc4-3764, MINI-658g-5j7x-hj23, MINI-659r-88m9-44x8, MINI-663j-pmj5-w969, MINI-67qg-83vg-m53v, MINI-6c56-69pp-x7hx, MINI-6fmx-pfgf-cv6j, MINI-6frh-q76h-79gc, MINI-6frp-v4rh-wxf6, MINI-6gmh-58xx-ppp3, MINI-6jqf-cgh2-crh3, MINI-6m7x-gq29-8mj5, MINI-6p76-c65p-6v76, MINI-6qhm-h5h9-85hw, MINI-6qw9-2mrx-v2rf, MINI-6r2g-q974-vr2j, MINI-6v5r-gq83-c2xf, MINI-6xgp-9285-9v75, MINI-727w-x4hm-8vqc, MINI-72m7-3jx3-jx2h, MINI-735c-c3g5-p4mh, MINI-739c-583f-f72r, MINI-73gp-7g5p-vp5c, MINI-73vh-cc88-m68r, MINI-7443-xmmg-rx6w, MINI-756r-7w35-7vh9, MINI-77c2-fgr6-6gf8, MINI-7qcv-r9h3-qhm7, MINI-7qmq-vq23-j3hc, MINI-7wcr-7qrp-h79h, MINI-7x6v-r67j-fv4q, MINI-85gw-5x5j-764g, MINI-875v-x82p-5w4x, MINI-87xp-3hfr-jhwr, MINI-89x6-j874-pqqc, MINI-8fxv-7m79-x9q8, MINI-8hmc-wwj9-v6f2, MINI-8mwq-xrx8-wj24, MINI-8q23-x222-rqhv, MINI-8q3c-84f4-wgpf, MINI-8vh7-fghf-fjwv, MINI-8wg3-f5xr-j234, MINI-8xv4-phw7-fgf4, MINI-95xf-985h-pccq, MINI-9695-85cj-vh4h, MINI-984x-x7fv-qjgv, MINI-99fr-vj3f-hmxj, MINI-9crq-49h4-87jr, MINI-9fjx-359q-8w5q, MINI-9hxf-6w24-gg2c, MINI-9jh8-qh2v-44h2, MINI-9mc9-j56f-928f, MINI-9pg9-97q4-q78h, MINI-9rjv-9cc6-jc8c, MINI-9vq6-pf67-gpx3, MINI-9wrq-7j28-mjr8, MINI-9x9c-xvrf-x7gh, MINI-c27c-x44w-hjwr, MINI-c2vr-xxq8-mq8q, MINI-c4j7-gvww-89g6, MINI-c64j-8w4f-cf8v, MINI-c76r-gw6p-2p93, MINI-c9px-h35v-8p6f, MINI-chvw-j4pf-324r, MINI-cjq7-4vqw-44f6, MINI-cx4m-j62w-ff48, MINI-cxx8-qc58-c728, MINI-f42v-7qjg-28f6, MINI-f56j-qffw-9m2w, MINI-f6r5-m42x-r534, MINI-f6x7-qq87-7c3h, MINI-f73c-jff3-43mc, MINI-f9v8-5gx4-cx22, MINI-fgf3-rxmc-2vq6, MINI-fgxf-92mq-j456, MINI-fhh3-7r62-fjm9, MINI-fmgv-86g9-3hhf, MINI-fmqp-5j54-v797, MINI-fr7g-4wc8-w2p3, MINI-frq5-2vwv-9p9r, MINI-fvqc-3gvj-w3w5, MINI-g3hr-3hf6-mwrj, MINI-g3m4-454f-5gxc, MINI-g538-g6wh-jqxr, MINI-g79r-74hr-xqph, MINI-g92g-cj88-hgwr, MINI-g959-g69x-5vm7, MINI-gf36-f2x9-j54f, MINI-ggf3-9mm5-gqwp, MINI-ghh5-fhcx-7pc9, MINI-gpcg-j8rm-4v4m, MINI-h25c-w6ww-5rr9, MINI-h29j-9f8j-j42c, MINI-h2xx-x282-xc9r, MINI-h56g-753x-7g4v, MINI-h782-rrqm-x8wh, MINI-h78q-5vw4-q2vr, MINI-h939-8vmj-wmqf, MINI-h97p-hx68-vqh7, MINI-h9fq-mhm2-8x7f, MINI-hccv-cwh5-3pmp, MINI-hgg8-qq8g-hm23, MINI-hm6x-f587-mv2r, MINI-hq4x-rqpm-5gxf, MINI-hr62-64gw-gc28, MINI-hr7f-52rj-58fj, MINI-hw29-x5vp-7h3f, MINI-hxc4-59qw-fg8w, MINI-hxg5-3p65-6479, MINI-hxq7-6j9r-7g28, MINI-j3v8-6rp6-fv3m, MINI-j48f-wpqm-9g3v, MINI-j8fx-7pc2-2vc2, MINI-j8pw-crcq-gw4q, MINI-jg5w-xgx7-f59r, MINI-jm2w-fv2x-445x, MINI-jp3m-8qm8-pwv7, MINI-jphv-829j-9wx2, MINI-jrvh-3xw4-g2hj, MINI-jv65-73j6-38xv, MINI-jvm6-3rx7-pmf9, MINI-jw84-r3g5-cmcx, MINI-m275-4g39-h2h2, MINI-m27c-2g3v-7jvp, MINI-m3vg-7rh3-x685, MINI-m6rh-f2g7-4whx, MINI-m7cv-gmw7-w3pj, MINI-m873-w3mg-7x7v, MINI-m99f-gx3j-rgpr, MINI-mgv2-x9ww-j667, MINI-mp75-5cpr-2582, MINI-mqj5-fr58-j8qm, MINI-mw5f-wfr7-4jc5, MINI-p338-jxp3-fc9q, MINI-p3cm-frc8-2xh6, MINI-p6mx-4rjw-3x4w, MINI-p7hg-8m9h-7pqx, MINI-pc97-qh55-2482, MINI-pffx-cmfw-pr6m, MINI-pfg2-fx3c-cjxj, MINI-pg82-3p4r-g4mg, MINI-ph4f-xw4h-6jxj, MINI-ppgp-48f9-7wqj, MINI-ppw7-g7vg-w6g3, MINI-pqj6-7vpr-p862, MINI-pxj4-h8vg-c378, MINI-pxq6-m55m-wmgv, MINI-q259-fvrp-qrff, MINI-q444-7xfq-7447, MINI-q53j-xwr9-h4vr, MINI-q5wm-8xfx-mwjr, MINI-q6h7-86mx-5h8v, MINI-q7jx-3fcf-5cp8, MINI-qf59-p527-mh37, MINI-qhf7-c64f-q3w4, MINI-qhjj-578g-c8gf, MINI-qhm4-jj6v-j2qf, MINI-qj8f-r548-m8xj, MINI-qjmp-86m9-h5jq, MINI-qm39-5q7f-9xmq, MINI-qr2p-x53c-xmf3, MINI-qrc2-mf29-f3fv, MINI-qv4r-q69m-9f4j, MINI-qvgc-6xcq-9h7f, MINI-qw9g-mh84-5q5r, MINI-r4hc-3gqv-whr9, MINI-r56x-3v5j-mmq3, MINI-r5j4-p4v3-fwhx, MINI-r985-p4pq-h534, MINI-rcj5-h22g-p35c, MINI-rcmg-jf79-qv8h, MINI-rgvh-ghjh-cr48, MINI-rm69-pv92-mwhw, MINI-rr76-qghq-jr7v, MINI-rxg9-5xgg-j6mq, MINI-rxh4-7vrj-cj8m, MINI-rxhm-5hj8-m3m2, MINI-rxph-vv29-6jq8, MINI-rxqv-mxhj-hvrf, MINI-v2j8-prmr-4jq9, MINI-v479-2ghq-mxvg, MINI-v59x-782f-433v, MINI-v5gc-444v-vh3q, MINI-v5j6-ghpc-x452, MINI-v6gc-v424-47j6, MINI-v796-cw56-95gg, MINI-vh8f-7m42-xqrc, MINI-vqv5-458r-6pgw, MINI-vrx3-fxgc-pm54, MINI-vxjv-8qff-q2qp, MINI-w2rv-3579-r32w, MINI-w58j-h2wf-j8mc, MINI-w7r6-545g-pxp7, MINI-wfvg-xcrg-gvx8, MINI-wg38-gfv6-hmxh, MINI-wg86-47fm-6wwx, MINI-wj6m-7m3v-9hj9, MINI-wm8h-wpwq-f5ff, MINI-wmj8-79xj-wh67, MINI-wmm6-4429-9jq2, MINI-wqpp-6fwv-f5pf, MINI-ww48-ghfg-4mqm, MINI-wx8w-86h4-xhpj, MINI-wxgj-3fhh-qq48, MINI-x364-jhf5-3w6w, MINI-x3h9-jxw6-2vm6, MINI-x57x-h834-2jjp, MINI-x58f-frm8-qgcm, MINI-x7v3-79fm-pvhq, MINI-x8h9-3qcm-g956, MINI-x8pw-jmcw-hp5v, MINI-x8rc-mh2j-698w, MINI-xcf7-6mhh-8pm9, MINI-xgr9-2rmr-jm78, MINI-xh5p-gxmh-wfxx, MINI-xvrm-g7cj-6v99, MINI-xw2w-69j6-x3qg, MINI-xwrq-hw92-gq8p, RHSA-2025:21778, RHSA-2025:21779, RHSA-2025:21815, RHSA-2025:21816, RHSA-2025:21964, RHSA-2025:22255, RHSA-2025:23001, RHSA-2025:23002, RHSA-2025:23087, RHSA-2025:23088, RHSA-2025:23294, RHSA-2025:23295, RHSA-2025:23325, RHSA-2025:23326, RHSA-2025:23348, RHSA-2025:23374, RHSA-2025:23394, RHSA-2025:23736, RHSA-2025:23746, RHSA-2025:23747, RHSA-2025:23948, RHSA-2026:0226, RHSA-2026:0227, RHSA-2026:0243, RHSA-2026:0244, RHSA-2026:0245, RHSA-2026:0246, RHSA-2026:0314, RHSA-2026:0477, RHSA-2026:0973, RHSA-2026:0987, RHSA-2026:1025, RHSA-2026:1377, RHSA-2026:1378, RHSA-2026:1379, RHSA-2026:1380, RHSA-2026:1381, RHSA-2026:1837, RHSA-2026:1838, RHSA-2026:2071, RHSA-2026:2082, RHSA-2026:5086, RHSA-2026:5234, RLSA-2025:21815, RLSA-2025:21816, RLSA-2025:23087, RLSA-2025:23088, RLSA-2025:23294, RLSA-2025:23295, RLSA-2025:23325, RLSA-2025:23326, RLSA-2025:23374, RLSA-2025:23948, RLSA-2026:1377, RLSA-2026:1380, RLSA-2026:1381, RLSA-2026:1837, RLSA-2026:1838, ROOT-OS-DEBIAN-13-CVE-2025-58183, UBUNTU-CVE-2025-58183

## What is CVE-2025-58183?

CVE-2025-58183 is a medium-severity denial of service vulnerability in Go standard library archive/tar, published on 29 Oct 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

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

## Which versions are affected by CVE-2025-58183?

2 open source packages ship an affected version, including golang and stdlib.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `golang` | Bitnami | All versions | 1.24.8, 1.25.2 |
| `stdlib` | Go | All versions | 1.24.8, 1.25.2 |
| `golang-docs` | AlmaLinux:10 | All versions | 1.25.3-1.el10_1.alma.1 |
| `golang-misc` | AlmaLinux:10 | All versions | 1.25.3-1.el10_1.alma.1 |
| `golang-src` | AlmaLinux:10 | All versions | 1.25.3-1.el10_1.alma.1 |
| `golang-tests` | AlmaLinux:10 | All versions | 1.25.3-1.el10_1.alma.1 |
| `grafana` | AlmaLinux:10 | All versions | 10.2.6-21.el10_1 |
| `grafana-selinux` | AlmaLinux:10 | All versions | 10.2.6-21.el10_1 |
| `image-builder` | AlmaLinux:10 | All versions | 31-3.el10_1 |
| `osbuild-composer` | AlmaLinux:10 | All versions | 149-4.el10_1.alma.3 |
| `osbuild-composer-core` | AlmaLinux:10 | All versions | 149-4.el10_1.alma.3 |
| `osbuild-composer-worker` | AlmaLinux:10 | All versions | 149-4.el10_1.alma.3 |
| `podman-docker` | AlmaLinux:10 | All versions | 7:5.6.0-8.el10_1 |
| `skopeo` | AlmaLinux:10 | All versions | 2:1.20.0-2.el10_1 |
| `skopeo-tests` | AlmaLinux:10 | All versions | 2:1.20.0-2.el10_1 |
| `grafana` | AlmaLinux:8 | All versions | 9.2.10-26.el8_10 |
| `grafana-selinux` | AlmaLinux:8 | All versions | 9.2.10-26.el8_10 |
| `osbuild-composer` | AlmaLinux:8 | All versions | 101.4-2.el8_10.alma.1 |
| `osbuild-composer-core` | AlmaLinux:8 | All versions | 101.4-2.el8_10.alma.1 |
| `osbuild-composer-worker` | AlmaLinux:8 | All versions | 101.4-2.el8_10.alma.1 |
| `delve` | AlmaLinux:9 | All versions | 1.25.2-1.el9_7 |
| `go-toolset` | AlmaLinux:9 | All versions | 1.25.3-1.el9_7 |
| `golang` | AlmaLinux:9 | All versions | 1.25.3-1.el9_7 |
| `golang-bin` | AlmaLinux:9 | All versions | 1.25.3-1.el9_7 |
| `golang-docs` | AlmaLinux:9 | All versions | 1.25.3-1.el9_7 |
| `golang-misc` | AlmaLinux:9 | All versions | 1.25.3-1.el9_7 |
| `golang-race` | AlmaLinux:9 | All versions | 1.25.3-1.el9_7 |
| `golang-src` | AlmaLinux:9 | All versions | 1.25.3-1.el9_7 |
| `golang-tests` | AlmaLinux:9 | All versions | 1.25.3-1.el9_7 |
| `grafana` | AlmaLinux:9 | All versions | 10.2.6-17.el9_7 |
| `grafana-selinux` | AlmaLinux:9 | All versions | 10.2.6-17.el9_7 |
| `image-builder` | AlmaLinux:9 | All versions | 31-2.el9_7 |
| `osbuild-composer` | AlmaLinux:9 | All versions | 149-3.el9_7.alma.3 |
| `osbuild-composer-core` | AlmaLinux:9 | All versions | 149-3.el9_7.alma.3 |
| `osbuild-composer-worker` | AlmaLinux:9 | All versions | 149-3.el9_7.alma.3 |
| `podman` | AlmaLinux:9 | All versions | 6:5.6.0-9.el9_7 |
| `podman-docker` | AlmaLinux:9 | All versions | 6:5.6.0-9.el9_7 |
| `podman-plugins` | AlmaLinux:9 | All versions | 6:5.6.0-9.el9_7 |
| `podman-remote` | AlmaLinux:9 | All versions | 6:5.6.0-9.el9_7 |
| `podman-tests` | AlmaLinux:9 | All versions | 6:5.6.0-9.el9_7 |

## How do I fix CVE-2025-58183?

Upgrade golang to a fixed version for your release line: 1.24.8 or 1.25.2.

## Is CVE-2025-58183 being exploited?

There is no known exploitation of CVE-2025-58183 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-58183 and fix it if it is affected.

What it is: CVE-2025-58183 is a medium-severity denial of service vulnerability in Go standard library archive/tar, published on 29 Oct 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2025-58183 in the wild and no public exploit code.

Affected packages and fixed versions:
- golang (Bitnami): affected all versions; fixed in 1.24.8, 1.25.2
- stdlib (Go): affected all versions; fixed in 1.24.8, 1.25.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-58183/ (Markdown: https://insights.sbomify.com/CVE-2025-58183/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-58183
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-58183
- OSV: https://osv.dev/vulnerability/CVE-2025-58183

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-58183/
Summaries are generated and may contain mistakes; the official description above is the record.
