# CVE-2019-16760: Cargo prior to Rust 1.26.0 may download the wrong dependency

- Severity: Medium 4.6 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.26%, higher than 70% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2019-09-30T21:39:38.000Z
- Modified: 2026-09-10T03:49:38.253Z
- Also known as: GHSA-9f3p-wvj7-q82x, GHSA-phjm-8x66-qw4r
- Weaknesses: CWE-16, CWE-494
- Assigned by: GitHub_M

## 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 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.

(As written by CVE List.)

## Affected

- rust cargo: from 1.0.0 before 1.26.0
- cargo (crates.io): before 0.27.0
- rust-lang rust: before 1.26.0

## Every score

- GitHub_M: CVSS:3.1 4.6 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:P/A:N`

## References

- <https://github.com/rust-lang/rust/security/advisories/GHSA-phjm-8x66-qw4r> (exploit, third-party-advisory, web)
- <https://groups.google.com/forum/#%21topic/rustlang-security-announcements/rVQ5e3TDnpQ> (web)
- <https://gist.github.com/pietroalbini/0d293b24a44babbeb6187e06eebd4992> (patch, third-party-advisory, web)
- <http://www.openwall.com/lists/oss-security/2019/10/08/3> (mailing-list, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2019-16760> (advisory)
- <https://groups.google.com/forum/#!topic/rustlang-security-announcements/rVQ5e3TDnpQ> (web)

## Sources

- CVE List: [CVE-2019-16760](https://www.cve.org/CVERecord?id=CVE-2019-16760), CVE Terms of Use, modified 2024-08-05
- GitHub Advisory Database: [GHSA-9f3p-wvj7-q82x](https://github.com/advisories/GHSA-9f3p-wvj7-q82x), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2019-16760](https://nvd.nist.gov/vuln/detail/CVE-2019-16760), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2019-16760 · Whole record: https://cve.day/CVE-2019-16760.json · Rebuilt by cve.day 2026-11-25T22:57:47.257Z
