tar-rs: unpack_in can chmod arbitrary directories by following symlinks
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
tarcrates.io | < 0.4.45 | 0.4.45 |
Affected products
28- osv-coords27 versionspkg:apk/chainguard/bootc-binarypkg:apk/chainguard/buck2pkg:apk/chainguard/cargo-cpkg:apk/chainguard/denopkg:apk/chainguard/fnmpkg:apk/chainguard/misepkg:apk/chainguard/pixipkg:apk/chainguard/qdrantpkg:apk/chainguard/rustuppkg:apk/chainguard/ryepkg:apk/chainguard/sccachepkg:apk/chainguard/typstpkg:apk/chainguard/wasmcloudpkg:apk/chainguard/wasm-packpkg:apk/chainguard/zizmorpkg:apk/wolfi/buck2pkg:apk/wolfi/cargo-cpkg:apk/wolfi/denopkg:apk/wolfi/pixipkg:apk/wolfi/qdrantpkg:apk/wolfi/rustuppkg:apk/wolfi/ryepkg:apk/wolfi/sccachepkg:apk/wolfi/wasmcloudpkg:apk/wolfi/wasm-packpkg:apk/wolfi/zizmorpkg:cargo/tar
< 1.10.0-r3+ 26 more
- (no CPE)range: < 1.10.0-r3
- (no CPE)range: < 20260315-r4
- (no CPE)range: < 0.10.21-r3
- (no CPE)range: < 2.7.8-r0
- (no CPE)range: < 1.39.0-r2
- (no CPE)range: < 2026.3.17-r0
- (no CPE)range: < 0.66.0-r3
- (no CPE)range: < 1.17.0-r7
- (no CPE)range: < 1.29.0-r1
- (no CPE)range: < 0.44.0-r7
- (no CPE)range: < 0.14.0-r3
- (no CPE)range: < 0.14.2-r2
- (no CPE)range: < 2.0.4-r0
- (no CPE)range: < 0.14.0-r4
- (no CPE)range: < 1.23.1-r4
- (no CPE)range: < 20260315-r4
- (no CPE)range: < 0.10.21-r3
- (no CPE)range: < 2.7.8-r0
- (no CPE)range: < 0.66.0-r3
- (no CPE)range: < 1.17.0-r7
- (no CPE)range: < 1.29.0-r1
- (no CPE)range: < 0.44.0-r7
- (no CPE)range: < 0.14.0-r3
- (no CPE)range: < 2.0.4-r0
- (no CPE)range: < 0.14.0-r4
- (no CPE)range: < 1.23.1-r4
- (no CPE)range: < 0.4.45
- alexcrichton/tar-rsv5Range: < 0.4.45
Patches
Vulnerability mechanics
References
5- github.com/advisories/GHSA-j4xf-2g29-59phghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-33056ghsaADVISORY
- github.com/alexcrichton/tar-rs/commit/17b1fd84e632071cb8eef9d3709bf347bd266446ghsax_refsource_MISCWEB
- github.com/alexcrichton/tar-rs/security/advisories/GHSA-j4xf-2g29-59phghsax_refsource_CONFIRMWEB
- rustsec.org/advisories/RUSTSEC-2026-0067.htmlghsaWEB
News mentions
0No linked articles in our index yet.