🛡️ CVE-2019-16760 — cargo
Description
Cargo prior to Rust 1.26.0 may download the wrong dependency
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.
How this vulnerability can be exploited
This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity high, availability none.
Weakness class
CVE-2019-16760 is classified as CWE-494: Download of Code Without Integrity Check. Code or updates are fetched and executed without verifying they are authentic and unmodified.
Affected software
CVE-2019-16760 is recorded against 1 package.
- cargo
Timeline and source
Published on 24 May 2022 and last revised on 13 March 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.
References
github.com (Web)
nvd.nist.gov (Advisory)
gist.github.com (Web)
groups.google.com (Web)
groups.google.com (Web)
www.openwall.com (Web)
Details
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| cargo | — | — |
References
Similar Threats
- Critical CVE-2026-14363
- Medium CVE-2026-39837
- Medium CVE-2026-39839
- Medium CVE-2026-39840
- Medium CVE-2026-39841
More CVE 2019 advisories
Browse all of CVE 2019 in the advisory index.
Site Security Check
Is cargo part of your stack?
CVE-2019-16760 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.