{"id":"CVE-2019-16760","published":"2019-09-30T21:39:38Z","modified":"2024-08-05T01:24:48Z","title":"Cargo prior to Rust 1.26.0 may download the wrong dependency","vendor":"rust","product":"cargo","tier":"core","eol":null,"affectedVersions":[{"vendor":"rust","product":"cargo","versions":[">= 1.0.0, < 1.26.0"]}],"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":null,"cvss":{"score":4.6,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0126,"percentile":0.69623,"date":"2026-11-01","provenance":"source"},"kev":null,"vulncheckKev":null,"exploited":false,"otx":{"pulseCount":0,"pulses":[],"provenance":"machine"},"cwes":[{"id":"CWE-16","name":"Configuration"}],"references":[{"url":"https://github.com/rust-lang/rust/security/advisories/GHSA-phjm-8x66-qw4r","tags":["x_refsource_CONFIRM"]},{"url":"https://groups.google.com/forum/#%21topic/rustlang-security-announcements/rVQ5e3TDnpQ","tags":["x_refsource_MISC"]},{"url":"https://gist.github.com/pietroalbini/0d293b24a44babbeb6187e06eebd4992","tags":["x_refsource_MISC"]},{"url":"http://www.openwall.com/lists/oss-security/2019/10/08/3","tags":["mailing-list","x_refsource_MLIST"]}],"techniques":[{"id":"T1190","name":"Exploit Public-Facing Application","tactics":["initial-access"],"provenance":"source","basis":"ctid-cve","bases":["ctid-cve"],"basisDetail":"CTID attack_to_cve (Phase 2)","mappingType":"primary_impact","evidence":[],"confidence":"low","confidenceNote":"needs user interaction; not a public-facing exploit"}],"reports":[],"affected":[{"ecosystem":"crates.io","package":"cargo","vulnerableRanges":["<0.27.0"],"patched":["0.27.0"],"from":["GHSA-9f3p-wvj7-q82x"],"provenance":"source"}],"advisories":[{"id":"GHSA-9f3p-wvj7-q82x","url":"https://github.com/advisories/GHSA-9f3p-wvj7-q82x","severity":"HIGH","ecosystem":"crates.io","package":"cargo","vulnerableRanges":["<0.27.0"],"patched":["0.27.0"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2022-3359","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2022-3359","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":null,"exploitRefs":[],"flow":[{"stage":"related","techniques":["T1190"],"provenance":"source","lowConfidence":true}],"timeline":[{"date":"2019-09-30","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2019-16760","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":null,"daysToKev":null},"priority":{"score":17.1,"factors":[{"name":"In a KEV catalog","points":0.0,"detail":"not listed"},{"name":"Recent KEV listing","points":0.0,"detail":"not listed"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":13.92,"detail":"percentile 0.6962"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":0.0,"detail":"none found"},{"name":"Mentioned in OTX pulses","points":0.0,"detail":"0 pulses"},{"name":"CVSS severity","points":3.22,"detail":"base score 4.6"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}