Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. astral-tokio-tar
  4. ›
  5. CVE-2025-59825

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

September 23, 2025 (updated November 18, 2025)

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 (e.g. by overwriting a file that the user or system then executes or uses to execute code).

The impact of this vulnerability for downstream API users of this crate is high, per above. However, for this crate’s main downstream user (uv), the impact of this vulnerability is low due to its overlap with equivalent user capabilities in source distributions. See GHSA-7j9j-68r2-f35q for additional details.

References

  • github.com/advisories/GHSA-3wgq-wrwc-vqmv
  • github.com/astral-sh/tokio-tar
  • github.com/astral-sh/tokio-tar/commit/036fdecc85c52458ace92dc9e02e9cef90684e75
  • github.com/astral-sh/tokio-tar/security/advisories/GHSA-3wgq-wrwc-vqmv
  • github.com/astral-sh/uv/issues/12163
  • github.com/google/security-research/security/advisories/GHSA-9p78-p5g6-gcj8
  • nvd.nist.gov/vuln/detail/CVE-2025-59825

Code Behaviors & Features

Detect and mitigate CVE-2025-59825 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.5.4

Fixed versions

  • 0.5.4

Solution

Upgrade to version 0.5.4 or above.

Impact 8.4 HIGH

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-61: UNIX Symbolic Link (Symlink) Following

Source file

cargo/astral-tokio-tar/CVE-2025-59825.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 04 Feb 2026 00:35:13 +0000.