GitHub Advisoryadvisory · crates.io

GHSA-62jx-8vmh-4mcw Links in archive can create arbitrary directories

HIGH Published 2021-08-25 Modified 2023-06-13 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