CVE-2026-33056 Details
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.
A vulnerability exists in the tar-rs library, specifically in versions through 0.4.44, related to how the library unpacks tar archives. The issue arises because the unpack_dir function uses fs::metadata() to verify if a path is a directory. This method follows symbolic links, which can be exploited by crafting a tarball with a symlink entry followed by a directory entry of the same name. As a result, the library mistakenly recognizes the symlink target as a valid directory and applies chmod to it. This flaw enables an attacker to alter the permissions of directories outside the extraction root.
Users can upgrade to tar-rs version 0.4.45, which addresses this vulnerability by using fs::symlink_metadata() to properly handle symlinks and prevent them from being followed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 20, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/alexcrichton/tar-rs/commit/17b1fd84e632071cb8eef9d3709bf347bd266446 | [email protected] | Patch |
| https://github.com/alexcrichton/tar-rs/security/advisories/GHSA-j4xf-2g29-59ph | [email protected] | ExploitMitigationVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-61 | UNIX Symbolic Link (Symlink) Following | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| tar project tar | < 0.4.45 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 24, 2026 | Initial Analysis | [email protected] |
| Mar 20, 2026 | New CVE Received | [email protected] |