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

Source: https://junglewise.ai/threats/cve-2021-38511-links-in-archive-can-create-arbitrary-directories  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-07-19  
License: CC BY 4.0 with a link back

CVE-2021-38511 · Severity: low · CVSS 3.1 · Published 2021-07-19

Links in archive can create arbitrary directories

Technologies: [tar (crates.io)](https://junglewise.ai/threats/technologies/crates-io-tar). Vendors: [crates.io](https://junglewise.ai/threats/vendors/crates-io).

## Quick answers

**Is CVE-2021-38511 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-38511 being exploited in the wild.

**How severe is CVE-2021-38511?** Low severity, with a CVSS score of 3.1, published 19 July 2021.

**Which products and versions are affected?** tar (crates.io) SEMVER:introduced=0,fixed=0.4.36, SEMVER:introduced=0.0.0-0,fixed=0.4.36.

**Is there a fix for CVE-2021-38511?** Yes. tar (crates.io): upgrade to 0.4.36 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2021-38511?** Check whether you run tar (crates.io) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- tar (crates.io): upgrade to 0.4.36 or later

  ```sh
  cargo update -p tar
  ```


## Affected products

- tar (crates.io) SEMVER:introduced=0,fixed=0.4.36, SEMVER:introduced=0.0.0-0,fixed=0.4.36

## Identifiers

- CVE-2021-38511
- GHSA-62jx-8vmh-4mcw
- RUSTSEC-2021-0080

## Related threats

- [Rust tar-rs archive parsing discrepancy via PAX size header ignore](https://junglewise.ai/threats/cve-2026-33055-rust-tar-rs-archive-parsing-discrepancy-via-pax-size-header)
- [RUSTSEC-2026-0067 - `unpack_in` can chmod arbitrary directories by following symlinks](https://junglewise.ai/threats/cve-2026-33056-tar-rs-unpack-in-can-chmod-arbitrary-directories-by-following)
- [RUSTSEC-2018-0002 - Links in archives can overwrite any existing file](https://junglewise.ai/threats/cve-2018-20990-arbitrary-file-overwrite-in-tar-rs)
