nabijaczleweli / cargo-update

A cargo subcommand for checking and applying updates to installed executables
MIT License
1.22k stars 42 forks source link

Update regex to address CVE-2022-24713/RUSTSEC-2022-0013 #193

Closed pbrkr closed 2 years ago

pbrkr commented 2 years ago

See:

We also need to update memchr to meet the requirements of regex v1.6.0.

nabijaczleweli commented 2 years ago

We're as unaffected as we were in March:

This issue has been assigned CVE-2022-24713. The severity of this vulnerability is "high" when the regex crate is used to parse untrusted regexes. Other uses of the regex crate are not affected by this vulnerability.

The only regexes we use are, indeed, constant:

src/ops/mod.rs:use regex::Regex;
src/ops/mod.rs:    static ref REGISTRY_RGX: Regex = Regex::new(r"([^\s]+) ([^\s]+) \(registry+\+([^\s]+)\)").unwrap();
src/ops/mod.rs:    static ref GIT_PACKAGE_RGX: Regex = Regex::new(r"([^\s]+) ([^\s]+) \(git+\+([^#\s]+)#([^\s]{40})\)").unwrap();

And regex 1.5.5 wants rust 1.41.1.

pbrkr commented 2 years ago

I've followed up with #194 to mark this advisory as ignored so that hopefully no-one else wastes time submitting a useless PR like this one :)