Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. astral-tokio-tar
  4. ›
  5. GHSA-3wgq-wrwc-vqmv

GHSA-3wgq-wrwc-vqmv: astral-tokio-tar has a path traversal in tar extraction

September 23, 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

Code Behaviors & Features

Detect and mitigate GHSA-3wgq-wrwc-vqmv 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.

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/GHSA-3wgq-wrwc-vqmv.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Wed, 08 Oct 2025 12:17:59 +0000.