# CVE-2026-33056: tar-rs: unpack_in can chmod arbitrary directories by following symlinks

> Attackers can modify permissions of arbitrary directories outside the extraction root by exploiting symlink handling in tar-rs, potentially leading to privilege escalation.

- **Severity:** Medium 5.1 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 20 Mar 2026
- **Updated:** 20 Mar 2026
- **Also known as:** ALPINE-CVE-2026-33056, AZL-80315, AZL-80499, AZL-80502, AZL-80511, AZL-80523, AZL-83037, BELL-CVE-2026-33056, CLEANSTART-2026-NS62471, CLSA-2026-1788535576, DEBIAN-CVE-2026-33056, GHSA-j4xf-2g29-59ph, MINI-29c3-fwcc-r725, MINI-2m9x-v7ph-92pc, MINI-7xgm-gvhg-26h5, MINI-mq5v-gqq6-mc6h, RUSTSEC-2026-0067, UBUNTU-CVE-2026-33056, USN-8138-1, USN-8138-2, USN-8139-1, USN-8168-1, USN-8168-2

## What is CVE-2026-33056?

CVE-2026-33056 is a medium-severity path traversal vulnerability in alexcrichton tar-rs, published on 20 Mar 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

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

Weakness: CWE-61 (UNIX Symbolic Link (Symlink) Following)

## Which versions are affected by CVE-2026-33056?

3 open source packages ship an affected version, including tar. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `tar` | crates.io | All versions | 0.4.45 |
| `tar` | crates.io | All versions | 0.4.45 |
| `tar` | crates.io | From 0.0.0-0 | 0.4.45 |

Products: Tar Project Tar.

## How do I fix CVE-2026-33056?

Upgrade tar to 0.4.45 or later.

## Is CVE-2026-33056 being exploited?

There is no known exploitation of CVE-2026-33056 in the wild and no public exploit code.

## Other vulnerabilities in alexcrichton tar-rs

- [CVE-2021-38511](https://insights.sbomify.com/CVE-2021-38511/): Links in archive can create arbitrary directories (high 7.5)
- [CVE-2018-20990](https://insights.sbomify.com/CVE-2018-20990/): Arbitrary file overwrite in tar-rs (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-33056 and fix it if it is affected.

What it is: CVE-2026-33056 is a medium-severity path traversal vulnerability in alexcrichton tar-rs, published on 20 Mar 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-33056 in the wild and no public exploit code.

Affected packages and fixed versions:
- tar (crates.io): affected all versions; fixed in 0.4.45
- tar (crates.io): affected all versions; fixed in 0.4.45
- tar (crates.io): affected from 0.0.0-0; fixed in 0.4.45

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-33056/ (Markdown: https://insights.sbomify.com/CVE-2026-33056/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-33056
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-33056
- OSV: https://osv.dev/vulnerability/CVE-2026-33056

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-33056/
Summaries are generated and may contain mistakes; the official description above is the record.
