{"id":"CVE-2018-20990","aliases":["EUVD-2021-1502","GHSA-2367-c296-3mp2","RUSTSEC-2018-0002","UBUNTU-CVE-2018-20990"],"status":"published","title":"Arbitrary file overwrite in tar-rs","description":"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.","severity":{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.01676,"percentile":0.77038,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-59"],"published":"2018-06-29T12:00:00Z","modified":"2026-10-24T10:30:30Z","fixes":[{"ecosystem":"crates.io","package":"tar","fixed_in":["0.4.16"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"tar","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.4.16"}]}]},{"source":"osv","ecosystem":"crates.io","package":"tar","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.4.16"}]}]},{"source":"osv","ecosystem":"crates.io","package":"tar","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.4.16"}]}]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"rust-tar","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.4.26-1","0.4.26-1ubuntu0.1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"rust-tar","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.4.26-1","0.4.37-1","0.4.37-3","0.4.37-3ubuntu0.1~esm1","0.4.37-3ubuntu0.1","0.4.37-3ubuntu0.1+esm1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"rust-tar","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.4.38-2","0.4.40-1","0.4.40-1ubuntu0.1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"rust-tar","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.4.43-4","0.4.43-4ubuntu0.1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"rust-tar","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.4.45-1","0.4.45-2"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"rust-tar","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.4.43-4","0.4.44-1","0.4.45-1"]}],"products":[{"vendor":"tar_project","product":"tar"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2018-0002.html","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2018-20990","tags":["advisory"]},{"url":"https://github.com/alexcrichton/tar-rs/pull/156","tags":["web"]},{"url":"https://github.com/alexcrichton/tar-rs/commit/54651a87ae6ba7d81fcc72ffdee2ea7eca2c7e85","tags":["web"]},{"url":"https://github.com/advisories/GHSA-2367-c296-3mp2"},{"url":"https://github.com/alexcrichton/tar-rs","tags":["package"]},{"url":"https://crates.io/crates/tar","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2018-20990","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2018-20990","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2018-20990","description":"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.","status":"published","published":"2019-08-26T12:39:33Z","modified":"2024-08-05T12:19:27.012Z","updated_at":"2026-11-02T14:35:00.237825Z"}],"euvd":[{"id":"EUVD-2021-1502","description":"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.","status":"published","published":"2019-08-26T12:39:33Z","modified":"2024-08-05T12:19:27Z","updated_at":"2026-11-03T02:39:28.311281Z"}],"ghsa":[{"id":"GHSA-2367-c296-3mp2","title":"Arbitrary file overwrite in tar-rs","description":"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.","status":"published","published":"2021-08-25T20:43:54Z","modified":"2023-06-13T21:53:49Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"cwes":["CWE-59"],"updated_at":"2026-11-02T14:36:54.225318Z"}],"nvd":[{"id":"CVE-2018-20990","description":"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.","status":"published","published":"2019-08-26T13:15:11.07Z","modified":"2026-06-17T01:53:53.547Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high","assessor":"primary"},{"version":"2.0","score":6.4,"vector":"AV:N/AC:L/Au:N/C:N/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-59"],"updated_at":"2026-11-02T14:04:59.278647Z"}],"osv":[{"id":"CVE-2018-20990","description":"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.","status":"published","published":"2019-08-26T13:15:11.07Z","modified":"2026-10-24T10:30:30.945612233Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"updated_at":"2026-11-02T15:44:09.145458Z"},{"id":"GHSA-2367-c296-3mp2","title":"Arbitrary file overwrite in tar-rs","description":"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.","status":"published","published":"2021-08-25T20:43:54Z","modified":"2023-11-08T04:00:13.305474Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"cwes":["CWE-59"],"updated_at":"2026-11-02T15:46:33.520522Z"},{"id":"RUSTSEC-2018-0002","title":"Links in archives can overwrite any existing file","description":"When unpacking a tarball with the `unpack_in`-family of functions it's intended\nthat only files within the specified directory are able to be written. Tarballs\nwith hard links or symlinks, however, can be used to overwrite any file on the\nfilesystem.\n\nTarballs can contain multiple entries for the same file. A tarball which first\ncontains an entry for a hard link or symlink pointing to any file on the\nfilesystem will have the link created, and then afterwards if the same file is\nlisted in the tarball the hard link will be rewritten and any file can be\nrewritten on the filesystem.\n\nThis has been fixed in https://github.com/alexcrichton/tar-rs/pull/156 and is\npublished as `tar` 0.4.16. Thanks to Max Justicz for discovering this and\nemailing about the issue!","status":"published","published":"2018-06-29T12:00:00Z","modified":"2023-11-08T04:00:13.305474Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"updated_at":"2026-11-02T15:53:39.492624Z"},{"id":"UBUNTU-CVE-2018-20990","description":"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.","status":"published","published":"2019-08-26T13:15:00Z","modified":"2026-10-17T12:55:00.03630466Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"updated_at":"2026-11-02T15:54:17.91743Z"}]}}
