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

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (1.26%). Schedule for your next planned update.

Does your project use an affected cargo version?

Paste your Cargo.lock to check it for CVE-2019-16760 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my Cargo.lock

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 (1647 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, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: crates.io (1).

PackageFixed In
cargo crates.io · Affected: 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. It has a 1.3% probability of exploitation within 30 days (EPSS score). 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

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
1.26%
EPSS percentile: 69.6

This is an above-median EPSS score — 69.6% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.

Also Known As

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

Related CVEs

  • CVE-2026-83816
    HIGH

    CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE

  • CVE-2026-83817
    HIGH

    CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution

  • 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 your own dependencies

Free, with no signup for up to 10 packages.

Check my Cargo.lock