Loading...
Skip to main content

CVE-2019-16760 — Vulnerability in cargo — CVE Details

HIGH

Cargo prior to Rust 1.26.0 may download the wrong dependency

Published May 24, 2022Updated September 10, 2026Source: osv

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.

Advisory Timeline

  • First published May 24, 2022 (1602 days ago).
  • Last revised September 10, 2026 — 1569 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Cargo
Update cargo to 0.27.0 or later
cargo update -p cargo --precise 0.27.0

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: crates.io (1).

PackageEcosystemAffectedFixed In
cargo
crates.io
All versions0.27.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Frequently Asked Questions

What is CVE-2019-16760?
Cargo prior to Rust 1.26.0 may download the wrong dependency This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.5/10).
How do I check if my project is affected by CVE-2019-16760?
CVE-2019-16760 affects cargo. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2019-16760 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.5

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-9f3p-wvj7-q82x
GHSA-phjm-8x66-qw4r

Related CVEs

  • CVE-2026-93657
    HIGH

    hickory-resolver: Resolver::lookup() and Resolver::lookup_ip() APIs obscure DNSSEC validation failures

  • CVE-2026-18140
    HIGH

    aws-smithy-json: Uncontrolled recursion in the aws-smithy-json unknown-key skip path allows unauthenticated remote denial of service in smithy-rs generated servers

  • CVE-2023-38497
    HIGH

    Cargo not respecting umask when extracting crate archives

  • CVE-2026-5223
    MEDIUM

    Cargo crates in third party registries can override the cached source of other crates

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies