GitHub Advisoryadvisory · crates.io
GHSA-62jx-8vmh-4mcw Links in archive can create arbitrary directories
HIGH
Official page ↗
- Aliases
- CVE-2021-38511
- Ecosystem
- crates.io
- Packages
- tar
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
- Weaknesses
- CWE-22
- Reviewed
- 2021-08-18
Affected packages
• crates.io tar: < 0.4.36 → fixed in 0.4.36
Description
When unpacking a tarball that contains a symlink the tar crate may create directories outside of the directory it's supposed to unpack into. The function errors when it's trying to create a file, but the folders are already created at this point.
Related
Alias · CVE (1)
- CVE-2021-38511 An issue was discovered in the tar crate before 0.4.36 for Rust. vulnerability
Weakness · CWE (1)
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory weakness
References
- https://nvd.nist.gov/vuln/detail/CVE-2021-38511 advisory
- https://github.com/alexcrichton/tar-rs/issues/238 web
- https://github.com/alexcrichton/tar-rs/pull/259 web
- https://github.com/alexcrichton/tar-rs package
- https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/tar/RUSTSEC-2021-0080.md web
- https://rustsec.org/advisories/RUSTSEC-2021-0080.html web