# CVE-2025-62518: astral-tokio-tar Vulnerable to PAX Header Desynchronization

> Attackers can smuggle archive entries by exploiting PAX header parsing flaws in the astral-tokio-tar Rust library, potentially leading to data exposure or logic errors.

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N`)
- **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:** 21 Oct 2025
- **Updated:** 22 Oct 2025
- **Also known as:** DEBIAN-CVE-2025-62518, GHSA-j5gw-2vrg-8fgx, MINI-7mwx-ghcw-68v7, RUSTSEC-2025-0110, RUSTSEC-2025-0111, UBUNTU-CVE-2025-62518, openSUSE-SU-2025:15658-1

## What is CVE-2025-62518?

CVE-2025-62518 is a high-severity vulnerability in astral-sh tokio-tar, published on 21 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

astral-tokio-tar is a tar archive reading/writing library for async Rust. Versions of astral-tokio-tar prior to 0.5.6 contain a boundary parsing vulnerability that allows attackers to smuggle additional archive entries by exploiting inconsistent PAX/ustar header handling. When processing archives with PAX-extended headers containing size overrides, the parser incorrectly advances stream position based on ustar header size (often zero) instead of the PAX-specified size, causing it to interpret file content as legitimate tar headers. This issue has been patched in version 0.5.6. There are no workarounds.

Weakness: CWE-843 (Access of Resource Using Incompatible Type)

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

6 open source packages ship an affected version, including astral-tokio-tar and tokio-tar.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `astral-tokio-tar` | crates.io | All versions | 0.5.6 |
| `astral-tokio-tar` | crates.io | All versions | 0.5.6 |
| `astral-tokio-tar` | crates.io | From 0.0.0-0 | 0.5.6 |
| `tokio-tar` | crates.io | All versions to 0.3.1 | None |
| `tokio-tar` | crates.io | All versions to 0.3.1 | None |
| `tokio-tar` | crates.io | From 0.0.0-0 | None |
| `python-uv` | openSUSE:Tumbleweed | All versions | 0.9.5-1.1 |

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

Upgrade astral-tokio-tar to 0.5.6 or later.

## Is CVE-2025-62518 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-62518 exists.

Public exploit code:

- CVE-2025-62518: TARmageddon (github_poc): https://github.com/edera-dev/cve-tarmageddon
- https://github.com/AirineiAndrei/Tarmageddon-CVE-2025-62518- (github_poc): https://github.com/AirineiAndrei/Tarmageddon-CVE-2025-62518-

## Fix prompt for AI coding agents

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

What it is: CVE-2025-62518 is a high-severity vulnerability in astral-sh tokio-tar, published on 21 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: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-62518 exists.

Affected packages and fixed versions:
- astral-tokio-tar (crates.io): affected all versions; fixed in 0.5.6
- astral-tokio-tar (crates.io): affected all versions; fixed in 0.5.6
- astral-tokio-tar (crates.io): affected from 0.0.0-0; fixed in 0.5.6
- tokio-tar (crates.io): affected all versions up to 0.3.1; no fix listed
- tokio-tar (crates.io): affected all versions up to 0.3.1; no fix listed
- tokio-tar (crates.io): affected from 0.0.0-0; no fix listed

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-62518/ (Markdown: https://insights.sbomify.com/CVE-2025-62518/index.md)
```

## Sources

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

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