{"answers":{"affected":"2 open source packages ship an affected version, including cargo. It affects 1 product.","exploited":"There is no known exploitation of CVE-2019-16760 in the wild and no public exploit code.","fix":"Upgrade cargo to 0.27.0 or later.","what":"CVE-2019-16760 is a medium-severity vulnerability in rust cargo, published on 30 Sep 2019. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2019-16760 and fix it if it is affected.\n\nWhat it is: CVE-2019-16760 is a medium-severity vulnerability in rust cargo, published on 30 Sep 2019. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2019-16760 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- cargo (crates.io): affected all versions; fixed in 0.27.0\n- cargo (crates.io): affected all versions; fixed in 0.27.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2019-16760/ (Markdown: https://insights.sbomify.com/CVE-2019-16760/index.md)","id":"CVE-2019-16760","markdown":"https://insights.sbomify.com/CVE-2019-16760/index.md","name":"CVE-2019-16760","record":{"aliases":["ALPINE-CVE-2019-16760","CLEANSTART-2026-KD42401","DEBIAN-CVE-2019-16760","GHSA-9f3p-wvj7-q82x","GHSA-phjm-8x66-qw4r"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"Rust package manager","requires_auth":"low_privilege","summary":"Attackers can hijack dependencies by squatting on crates.io when Cargo ignores package renaming keys, leading to malicious code execution.","user_interaction":"required","vuln_class":"supply_chain"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"rust","vendor":"rust-lang"}],"cvss":{"score":4.6,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-494","name":"Download of Code Without Integrity Check"},{"id":"CWE-16","name":null}],"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.","ecosystems":["crates.io"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Cargo prior to Rust 1.26.0 may download the wrong dependency","id":"CVE-2019-16760","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"supply_chain","year":"2019"},"n_packages":2,"n_references":4,"next":{"headline":"Validator parsing discrepancy due to string encoding in NPM slp-validate 1.0.0","id":"CVE-2019-16761"},"packages":[{"ecosystem":"crates.io","fixed":["0.27.0"],"introduced":["0"],"last_affected":[],"package":"cargo","purl":null,"source":"GHSA-9f3p-wvj7-q82x"},{"ecosystem":"crates.io","fixed":["0.27.0"],"introduced":["0"],"last_affected":[],"package":"cargo","purl":"pkg:cargo/cargo","source":"GHSA-9f3p-wvj7-q82x"}],"prev":{"headline":"vBulletin PHP Module Remote Code Execution","id":"CVE-2019-16759"},"products":["cargo"],"published":"2019-09-30","related":[{"cvss_score":9.8,"headline":"Use after free in n/a","id":"CVE-2020-36318","kev_date_added":null,"published":"2021-04-11"},{"cvss_score":9.8,"headline":"Integer overflow in n/a","id":"CVE-2018-1000810","kev_date_added":null,"published":"2018-10-08"},{"cvss_score":9.1,"headline":"Security feature bypass in n/a","id":"CVE-2021-29922","kev_date_added":null,"published":"2021-08-07"},{"cvss_score":8.2,"headline":"Rust OS Command Injection/Argument Injection vulnerability","id":"CVE-2024-43402","kev_date_added":null,"published":"2024-09-04"},{"cvss_score":7.8,"headline":"Memory corruption in n/a","id":"CVE-2018-1000657","kev_date_added":null,"published":"2018-08-20"},{"cvss_score":7.8,"headline":"Other in n/a","id":"CVE-2018-1000622","kev_date_added":null,"published":"2018-07-09"},{"cvss_score":7.5,"headline":"Memory corruption in n/a","id":"CVE-2015-20001","kev_date_added":null,"published":"2021-04-11"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-05","vendors":["rust"]},"summary":"Attackers can hijack dependencies by squatting on crates.io when Cargo ignores package renaming keys, leading to malicious code execution.","url":"https://insights.sbomify.com/CVE-2019-16760/"}