Every CVE Search/ Get API key

CVE-2018-20990

Arbitrary file overwrite in tar-rs

7.5 HighFix available

An issue was discovered in the tar crate before 0.4.16 for Rust. Arbitrary file overwrite can occur via a symlink or hardlink in a TAR archive.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
High
Availability
None

Exploit likelihood

1.68%Up 1.3 points since Apr 14, 2021
90%50%10%1%

What each source reports

NVD Score used 7.5

An issue was discovered in the tar crate before 0.4.16 for Rust. Arbitrary file overwrite can occur via a symlink or hardlink in a TAR archive.

Record
CVE-2018-20990
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
CVSS 2.0
6.4 MediumAV:N/AC:L/Au:N/C:N/I:P/A:P
Weakness
CWE-59
Updated
2026-11-02
CVE List No score

An issue was discovered in the tar crate before 0.4.16 for Rust. Arbitrary file overwrite can occur via a symlink or hardlink in a TAR archive.

Record
CVE-2018-20990
Updated
2026-11-02
EUVDEUVD-2021-1502 No score

An issue was discovered in the tar crate before 0.4.16 for Rust. Arbitrary file overwrite can occur via a symlink or hardlink in a TAR archive.

Record
EUVD-2021-1502
Updated
2026-11-03
GitHub AdvisoriesGHSA-2367-c296-3mp2 7.5

Arbitrary file overwrite in tar-rs

When unpacking a tarball with the unpack_in-family of functions it's intended that only files within the specified directory are able to be written. Tarballs with hard links or symlinks, however, can be used to overwrite any file on the filesystem. Tarballs can contain multiple entries for the same file. A tarball which first contains an entry for a hard link or symlink pointing to any file on the filesystem will have the link created, and then afterwards if the same file is listed in the tarball the hard link will be rewritten and any file can be rewritten on the filesystem.

Record
GHSA-2367-c296-3mp2
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Weakness
CWE-59
Updated
2026-11-02
OSV 7.5

An issue was discovered in the tar crate before 0.4.16 for Rust. Arbitrary file overwrite can occur via a symlink or hardlink in a TAR archive.

Record
CVE-2018-20990
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Updated
2026-11-02
OSVGHSA-2367-c296-3mp2 7.5

Arbitrary file overwrite in tar-rs

When unpacking a tarball with the unpack_in-family of functions it's intended that only files within the specified directory are able to be written. Tarballs with hard links or symlinks, however, can be used to overwrite any file on the filesystem. Tarballs can contain multiple entries for the same file. A tarball which first contains an entry for a hard link or symlink pointing to any file on the filesystem will have the link created, and then afterwards if the same file is listed in the tarball the hard link will be rewritten and any file can be rewritten on the filesystem.

Record
GHSA-2367-c296-3mp2
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Weakness
CWE-59
Updated
2026-11-02
OSVRUSTSEC-2018-0002 7.5

Links in archives can overwrite any existing file

When unpacking a tarball with the unpack_in-family of functions it's intended that only files within the specified directory are able to be written. Tarballs with hard links or symlinks, however, can be used to overwrite any file on the filesystem.

Tarballs can contain multiple entries for the same file. A tarball which first contains an entry for a hard link or symlink pointing to any file on the filesystem will have the link created, and then afterwards if the same file is listed in the tarball the hard link will be rewritten and any file can be rewritten on the filesystem.

This has been fixed in https://github.com/alexcrichton/tar-rs/pull/156 and is published as tar 0.4.16. Thanks to Max Justicz for discovering this and emailing about the issue!

Record
RUSTSEC-2018-0002
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Updated
2026-11-02
OSVUBUNTU-CVE-2018-20990 7.5

An issue was discovered in the tar crate before 0.4.16 for Rust. Arbitrary file overwrite can occur via a symlink or hardlink in a TAR archive.

Record
UBUNTU-CVE-2018-20990
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
tar
crates.io
before 0.4.16
0.4.16
tar
crates.io
0.0.0-0 up to 0.4.16
0.4.16
rust-tar
Ubuntu:Pro:20.04:LTS
All versions, plus listed versions
0.4.26-10.4.26-1ubuntu0.1
None known
rust-tar
Ubuntu:Pro:22.04:LTS
All versions, plus listed versions
0.4.26-10.4.37-10.4.37-30.4.37-3ubuntu0.1~esm10.4.37-3ubuntu0.10.4.37-3ubuntu0.1+esm1
None known
rust-tar
Ubuntu:24.04:LTS
All versions, plus listed versions
0.4.38-20.4.40-10.4.40-1ubuntu0.1
None known
rust-tar
Ubuntu:25.10
All versions, plus listed versions
0.4.43-40.4.43-4ubuntu0.1
None known
rust-tar
Ubuntu:26.10
All versions, plus listed versions
0.4.45-10.4.45-2
None known
rust-tar
Ubuntu:26.04:LTS
All versions, plus listed versions
0.4.43-40.4.44-10.4.45-1
None known

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2018-20990 is a high vulnerability (CVSS 7.5) in Tar Project Tar, published June 29, 2018. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.68%, the 76th percentile. Fixed in tar 0.4.16.

References

MoveEnter Open