CVE-2019-16760 json
Cargo prior to Rust 1.26.0 may download the wrong dependency
published 7y ago modified last mo. also GHSA-9f3p-wvj7-q82x , GHSA-phjm-8x66-qw4r , EUVD-2022-3359
- cvss
- 4.6
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.3%
- EPSS 1.3% chance of exploitation in 30 days, percentile 69%
- public exploits
- 0
- none known
Summary
Cargo prior to Rust 1.26.0 may download the wrong dependency if your package.toml file uses the `package` configuration key. Usage of the `package` key to rename dependencies in `Cargo.toml` is ignored in Rust 1.25.0 and prior. When Rust 1.25.0 and prior is used Cargo may download the wrong dependency, which could be squatted on crates.io to be a malicious package. This not only affects manifests that you write locally yourself, but also manifests published to crates.io. Rust 1.0.0 through Rust 1.25.0 is affected by this advisory because Cargo will ignore the `package` key in manifests. Rust 1.26.0 through Rust 1.30.0 are not affected and typically will emit an error because the `package` key is unstable. Rust 1.31.0 and after are not affected because Cargo understands the `package` key. Users of the affected versions are strongly encouraged to update their compiler to the latest available one. Preventing this issue from happening requires updating your compiler to be either Rust 1.26.0 or newer. There will be no point release for Rust versions prior to 1.26.0. Users of Rust 1.19.0 to Rust 1.25.0 can instead apply linked patches to mitigate the issue.
Patch / fix
- crates.io cargo 0.27.0
- rust cargo 1.26.0
- cargo Debian 12 0.27.0-1
debian advisories DEBIAN-CVE-2019-16760
- rust Alpine 3.24, Alpine 3.23, Alpine 3.22 +11 more 1.26.0-r0
- chromium-rust Alpine 3.24 1.26.0-r0
alpine advisories ALPINE-CVE-2019-16760
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Is CVE-2019-16760 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2019-16760 updated cvss 5.3
rust: privilege escaltion in cargo
-
Red Hat Enterprise Linux 8 rls, rust, cargo, clippy, rustfmt, rust-gdb, +8 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.26% chance of exploitation in the next 30 days, higher than 69% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- github.com https://github.com/rust-lang/rust/security/advisories/GHSA-phjm-8x66-qw4r referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 4.6 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | cargo | <0.27.0 |
0.27.0 |
Affected products
- rust cargo
Classification
References
-
gist.github.com
/pietroalbini/0d293b24a44babbeb6187e06eebd4992
web, patch, third-party-advisory
-
github.com
/rust-lang/rust/security/advisories/GHSA-phjm-8x66-qw4r
web, exploit, third-party-advisory
-
groups.google.com
/forum/#%21topic/rustlang-security-announcements/rVQ5e3TDnpQ
web
-
openwall.com
/lists/oss-security/2019/10/08/3
mailing-list, web
-
nvd.nist.gov
/vuln/detail/CVE-2019-16760
advisory
-
groups.google.com
/forum/#!topic/rustlang-security-announcements/rVQ5e3TDnpQ
web
Sources
- CVE List CVE-2019-16760
- GitHub Advisory GHSA-9f3p-wvj7-q82x
- NVD CVE-2019-16760
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.