tokio-tar parses PAX extended headers incorrectly, allows file smuggling
This crate has no reviews yet. To add a review, set up your cargo-crev.
Lib.rs has been able to verify that all files in the crate's tarball, except Cargo.lock,
are in the crate's repository with a git tag matching the version. Please note that this check is still in beta, and absence of this confirmation does not mean that the files don't match.
Crates in the crates.io registry are tarball snapshots uploaded by crates' publishers. The registry is not using crates' git repositories, so there is a possibility that published crates have a misleading repository URL, or contain different code from the code in the repository.
To review the actual code of the crate, it's best to use cargo crev open tokio-tar. Alternatively, you can download the tarball of tokio-tar v0.3.1 or view the source online.
The archive reader incorrectly handles PAX extended headers, when the ustar header incorrectly specifies zero size (
size=000000000000), while a PAX header specifies a non-zero size,tokio-tar::Archiveis going to read the file content as tar entry header.This can be used by a tar file to present different content to
tokio-tarcompared to other tar reader implementations.This bug is also known as
CVE-2025-62518andGHSA-j5gw-2vrg-8fgx, as those crates share a common ancestor codebase.The
tokio-tarcrate is archived and no longer maintained, we recommend you switch to an alternative crate such as:astral-tokio-tarCVE-2025-62518
GHSA-j5gw-2vrg-8fgx