# CVE-2021-38511: Links in archive can create arbitrary directories

- Severity: High 7.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.39%, higher than 73% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2021-07-19T12:00:00.000Z
- Modified: 2026-07-17T16:00:04.671Z
- Also known as: GHSA-62jx-8vmh-4mcw, RUSTSEC-2021-0080
- Weaknesses: CWE-22, CWE-59
- Assigned by: mitre

## Description

An issue was discovered in the tar crate before 0.4.36 for Rust. When symlinks are present in a TAR archive, extraction can create arbitrary directories via .. traversal.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- tar (crates.io): before 0.4.36; from 0.0.0-0 before 0.4.36
- tar_project tar: before 0.4.36

## Every score

- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- RustSec Advisory Database: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:P/A:N`

## References

- <https://rustsec.org/advisories/RUSTSEC-2021-0080.html> (exploit, advisory, third-party-advisory, web)
- <https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/tar/RUSTSEC-2021-0080.md> (exploit, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-38511> (advisory)
- <https://github.com/alexcrichton/tar-rs/issues/238> (report, web)
- <https://github.com/alexcrichton/tar-rs/pull/259> (web)
- <https://github.com/alexcrichton/tar-rs> (package)
- <https://crates.io/crates/tar> (package)

## Sources

- CVE List: [CVE-2021-38511](https://www.cve.org/CVERecord?id=CVE-2021-38511), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-62jx-8vmh-4mcw](https://github.com/advisories/GHSA-62jx-8vmh-4mcw), CC-BY-4.0, modified 2023-11-08
- RustSec Advisory Database: [RUSTSEC-2021-0080](https://rustsec.org/advisories/RUSTSEC-2021-0080.html), CC0-1.0, modified 2026-07-17
- NVD: [CVE-2021-38511](https://nvd.nist.gov/vuln/detail/CVE-2021-38511), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-38511 · Whole record: https://cve.day/CVE-2021-38511.json · Rebuilt by cve.day 2026-11-25T22:58:03.100Z
