// For flags

CVE-2019-16760

Cargo prior to Rust 1.26.0 may download the wrong dependency

Severity Score

7.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

1
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

Cargo anterior a Rust versión 1.26.0, puede descargar la dependencia incorrecta si su archivo package.toml usa la clave de configuración "package". El uso de la clave "package" para cambiar el nombre de las dependencias en "Cargo.toml" se ignora en Rust versión 1.25.0 y anteriores. Cuando se usa Rust versión 1.25.0 y anteriores, Cargo puede descargar la dependencia incorrecta, que podría ser establecido en crates.io para ser un paquete malicioso. Esto no solo afecta a los manifiestos que escriben localmente, sino también a los manifiestos publicados en crates.io. Si usted publicó un paquete (create), por ejemplo, que depende de "serde1" en crates.io, los usuarios que dependen de usted también pueden ser vulnerables si usan Rust versión 1.25.0 y anteriores. Rust versiones 1.0.0 hasta Rust versiones 1.25.0, está afectado por este aviso porque Cargo ignorará la clave "package" en los manifiestos. Rust versión 1.26.0 hasta Rust versión 1.30.0, no están afectados y normalmente emitirán un error porque la clave "package" es inestable. Rust versión 1.31.0 y posteriores, no están afectados porque Cargo entiende la clave "package". Se recomienda encarecidamente a los usuarios de las versiones afectadas que actualicen su compilador a la última versión disponible. Para evitar que ocurra este problema, es necesario actualizar su compilador para que sea Rust versión 1.26.0 o más reciente. No se emitirá ningún parche para las versiones de Rust anteriores a 1.26.0. Los usuarios de Rust versión 1.19.0 hasta Rust versión 1.25.0, pueden aplicar parches vinculados para mitigar el problema.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None
Attack Vector
Network
Attack Complexity
High
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low
Attack Vector
Network
Attack Complexity
Low
Authentication
None
Confidentiality
None
Integrity
Partial
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2019-09-24 CVE Reserved
  • 2019-09-30 CVE Published
  • 2023-11-08 EPSS Updated
  • 2024-08-05 CVE Updated
  • 2024-08-05 First Exploit
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
CWE
  • CWE-16: Configuration
  • CWE-494: Download of Code Without Integrity Check
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Rust-lang
Search vendor "Rust-lang"
Rust
Search vendor "Rust-lang" for product "Rust"
< 1.26.0
Search vendor "Rust-lang" for product "Rust" and version " < 1.26.0"
-
Affected