All vulnerabilities

Servers and applications

CVE-2019-16760

Cargo prior to Rust 1.26.0 may download the wrong dependency

Severity
High 7.5
Published
30 Sept 2019
Last changed
19 Jun 2026
Added to UpHeron
22 Oct 2026
Fixed in
1.26.0
Also known as
GHSA-phjm-8x66-qw4r
Sources
NVD, Project advisories (GitHub)

Description

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…

Affected software

SoftwareAffected versions
RustServers and applications · cpe:a:rust-lang:rust
  • Every version before 1.26.0
RustServers and applications · github:rust-lang/rust
  • Every version up to 1.25.0

References

  • NVD https://nvd.nist.gov/vuln/detail/CVE-2019-16760
  • CVE.org https://www.cve.org/CVERecord?id=CVE-2019-16760
  • GitHub Advisory Database https://github.com/advisories/GHSA-phjm-8x66-qw4r
  • github.com https://github.com/rust-lang/rust/security/advisories/GHSA-phjm-8x66-qw4r