Advisory

GHSA-2367-c296-3mp2

Also known as: CVE-2018-20990, RUSTSEC-2018-0002

Summary

Arbitrary file overwrite in tar-rs

Details

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.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2021-08-25 20:43 UTC
Modified
2023-11-08 04:00 UTC

Affected packages and fixes

tar

crates.io · All systems

Affected

  • introduced 0, fixed 0.4.16 (semver)

Fixed versions

0.4.16

Fix

  • Fixed version 0.4.16
    cargo update -p tar --precise 0.4.16

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences