Skip to content
OpenAdvisories

Description

tar-rs is a tar archive reading/writing library for Rust. In versions 0.4.44 and below, when unpacking a tar archive, the tar crate's unpack_dir function uses fs::metadata() to check whether a path that already exists is a directory. Because fs::metadata() follows symbolic links, a crafted tarball containing a symlink entry followed by a directory entry with the same name causes the crate to treat the symlink target as a valid existing directory — and subsequently apply chmod to it. This allows an attacker to modify the permissions of arbitrary directories outside the extraction root. This issue has been fixed in version 0.4.45.

Affected products

VendorProductAffectedFixed
alexcrichton tar-rs < 0.4.45 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 rust-tar 0.4.45-1 —
Debian 14 rustc 1.92.0+dfsg1-2 —
Debian 13 rust-tar No fix yet —
Debian 13 rustc 1.85.1+dfsg1-1+deb13u1 —
Debian 12 rustc +1 No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 rust-astral-tokio-tar No fix yet —
Ubuntu 26.04 LTS rust-astral-tokio-tar No fix yet —
Ubuntu 25.10 rust-async-tar +1 No fix yet —
Ubuntu 25.10 rust-cargo-c 0.10.11-1ubuntu1.1 USN-8139-1
Ubuntu 25.10 rust-tar 0.4.43-4ubuntu0.1 USN-8138-1
Ubuntu 25.10 rustc-1.85 1.85.1+dfsg0ubuntu2-0ubuntu1.25.04.1 USN-8168-1
Ubuntu 25.10 rustc-1.88 1.88.0+dfsg0ubuntu1-0ubuntu2 USN-8168-1
Ubuntu 24.04 LTS rust-cargo-c +1 No fix yet —
Ubuntu 24.04 LTS rust-tar 0.4.40-1ubuntu0.1 USN-8138-1
Ubuntu 24.04 LTS rustc 1.75.0+dfsg0ubuntu1-0ubuntu7.4 USN-8168-1
Ubuntu 24.04 LTS rustc-1.74 1.74.1+dfsg0ubuntu1-0ubuntu15 USN-8168-1
Ubuntu 24.04 LTS rustc-1.76 1.76.0+dfsg0ubuntu1-0ubuntu0.24.04.2 USN-8168-1
Ubuntu 24.04 LTS rustc-1.77 1.77.2+dfsg1ubuntu1-0ubuntu0.24.04.1 USN-8168-1
Ubuntu 24.04 LTS rustc-1.78 1.78.0+dfsg1ubuntu1-0ubuntu0.24.04.2 USN-8168-1
Ubuntu 24.04 LTS rustc-1.79 1.79.0+dfsg1ubuntu1-0ubuntu0.24.04.1 USN-8168-1
Ubuntu 24.04 LTS rustc-1.80 1.80.1+dfsg0ubuntu1-0ubuntu0.24.04.01 USN-8168-1
Ubuntu 24.04 LTS rustc-1.81 1.81.0+dfsg0ubuntu1-0ubuntu0.24.04.1 USN-8168-1
Ubuntu 24.04 LTS rustc-1.82 1.82.0+dfsg0ubuntu0-0ubuntu0.24.04.1 USN-8168-1
Ubuntu 24.04 LTS rustc-1.83 1.83.0+dfsg0ubuntu1~bpo2-0ubuntu0.24.04.1 USN-8168-1
Ubuntu 24.04 LTS rustc-1.84 1.84.1+dfsg0ubuntu1~bpo2-0ubuntu2.24.04.1 USN-8168-1
Ubuntu 24.04 LTS rustc-1.85 1.85.1+dfsg0ubuntu2~bpo0-0ubuntu0.24.04.2 USN-8168-1
Ubuntu 24.04 LTS rustc-1.89 1.89.0+dfsg~24.04-0ubuntu0.24.04.2 USN-8168-1
Ubuntu 24.04 LTS rustc-1.91 1.91.1+dfsg~24.04-0ubuntu0.24.04.2 USN-8168-1
Ubuntu 22.04 LTS rust-tar 0.4.37-3ubuntu0.1 USN-8138-1
Ubuntu 22.04 LTS rustc 1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04.1 USN-8168-1
Ubuntu 22.04 LTS rustc-1.62 1.62.1+dfsg1-1ubuntu0.22.04.3 USN-8168-1
Ubuntu 22.04 LTS rustc-1.76 1.76.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04.1 USN-8168-1
Ubuntu 22.04 LTS rustc-1.77 1.77.2+dfsg1ubuntu1~bpo0-0ubuntu0.22.04.1 USN-8168-1
Ubuntu 22.04 LTS rustc-1.78 1.78.0+dfsg1ubuntu1~bpo0-0ubuntu0.22.04.1 USN-8168-1
Ubuntu 22.04 LTS rustc-1.79 1.79.0+dfsg1ubuntu1~bpo0-0ubuntu0.22.04.1 USN-8168-1
Ubuntu 22.04 LTS rustc-1.80 1.80.1+dfsg0ubuntu1~bpo0-0ubuntu0.22.04.1 USN-8168-1
Ubuntu 22.04 LTS rustc-1.81 1.81.0+dfsg0ubuntu0-0ubuntu0.22.04.1 USN-8168-1
Ubuntu 22.04 LTS rustc-1.82 1.82.0+dfsg0ubuntu0~jammy-0ubuntu0.22.04.1 USN-8168-1
Ubuntu 22.04 LTS rustc-1.83 1.83.0+dfsg0ubuntu2~bpo2-0ubuntu2.22.04.1 USN-8168-1
Ubuntu 22.04 LTS rustc-1.84 1.84.1+dfsg0ubuntu1~bpo10-0ubuntu4.22.04.1 USN-8168-1
Ubuntu 22.04 LTS rustc-1.85 1.85.1+dfsg0ubuntu2~bpo0-0ubuntu1.22.04.1 USN-8168-1
Ubuntu 22.04 LTS rustc-1.89 1.89.0+dfsg~24.04-0ubuntu0.22.04.2 USN-8168-1
Ubuntu 22.04 LTS rustc-1.91 1.91.1+dfsg~22.04-0ubuntu0.22.04.3 USN-8168-1
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 22.04 LTS cargo No fix yet —
Ubuntu Pro 20.04 LTS cargo +6 No fix yet —
Ubuntu Pro 20.04 LTS rust-tar 0.4.26-1ubuntu0.1 USN-8138-2
Ubuntu Pro 18.04 LTS cargo +1 No fix yet —
Ubuntu Pro 16.04 LTS cargo +1 No fix yet —
Ubuntu Pro 14.04 LTS rustc No fix yet —
ReleasePackageFixed inAdvisory
Alpine v3.24 rust +1 1.94.0-r1 —
Alpine v3.23 rust 1.91.1-r1 —
Alpine v3.22 rust 1.87.0-r1 —
Alpine v3.21 rust 1.83.0-r1 —
Alpine v3.20 rust 1.78.0-r1 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 below 0.11.0-1.amzn2023.0.3 ALAS2023-2026-1567
Amazon Linux 2023 cargo-c 0.10.19-1.amzn2023.0.2 ALAS2023-2026-1566
Amazon Linux 2023 clamd1.5 +8 1.5.1-1.amzn2023.0.5 ALAS2023-2026-1565
Amazon Linux 2023 rust +14 1.94.0-1.amzn2023.0.2 ALAS2023-2026-1568
Amazon Linux 2 rust +11 1.94.0-1.amzn2.0.2 ALAS2-2026-3246

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 clamav 1.5.2-2 —
Azure Linux 3 rpm-ostree 2024.4-10 —
Azure Linux 3 rust 1.75.0-28 —
Azure Linux 3 tardev-snapshotter No fix yet —
Azure Linux 3 trident 0.22.0-1 —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling buck2 20260315-r4 —
Wolfi rolling cargo-c 0.10.21-r3 —
Wolfi rolling deno 2.7.8-r0 —
Wolfi rolling pixi 0.66.0-r3 —
Wolfi rolling qdrant 1.17.0-r7 —
Wolfi rolling rustup 1.29.0-r1 —
Wolfi rolling rye 0.44.0-r7 —
Wolfi rolling sccache 0.14.0-r3 —
Wolfi rolling wasm-pack 0.14.0-r4 —
Wolfi rolling wasmcloud 2.0.4-r0 —
Wolfi rolling zizmor 1.23.1-r4 —

Affected packages

EcosystemPackageAffectedFixedRecord
crates.io tar < 0.4.45 0.4.45 GHSA-j4xf-2g29-59ph
crates.io tar >= 0.0.0-0, < 0.4.45 0.4.45 RUSTSEC-2026-0067

Advisories 9

References