{"answers":{"affected":"2 open source packages ship an affected version, including cargo. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-5222 in the wild and no public exploit code.","fix":"Upgrade cargo to 0.97.0 or later.","what":"CVE-2026-5222 is a low-severity vulnerability in Rust Cargo, published on 25 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-5222 and fix it if it is affected.\n\nWhat it is: CVE-2026-5222 is a low-severity vulnerability in Rust Cargo, published on 25 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2026-5222 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- cargo (crates.io): affected all versions; fixed in 0.97.0\n- cargo (crates.io): affected all versions; fixed in 0.97.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-2026-5222/ (Markdown: https://insights.sbomify.com/CVE-2026-5222/index.md)","id":"CVE-2026-5222","markdown":"https://insights.sbomify.com/CVE-2026-5222/index.md","name":"CVE-2026-5222","record":{"aliases":["ALPINE-CVE-2026-5222","AZL-88275","AZL-88281","BELL-CVE-2026-5222","DEBIAN-CVE-2026-5222","GHSA-p688-r7jv-fm6f","MINI-grfw-7pq8-2349","UBUNTU-CVE-2026-5222"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":true,"product_category":"Rust package manager","requires_auth":"none","summary":"Attackers can steal registry credentials by exploiting URL normalization flaws in Cargo when multiple registries share a domain.","user_interaction":"required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"rust","cpe":[{"product":"cargo","vendor":"rust-lang"}],"cvss":{"score":2.3,"severity":"low","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-647","name":"Use of Non-Canonical URL Paths for Authorization Decisions"}],"description":"Cargo between 1.68 and 1.96 incorrectly normalized the URLs of third-party registries using the sparse index protocol. If a hosting provider allowed multiple registries to be hosted with arbitrary names within the same domain, an attacker able to publish crates in a registry could obtain the credentials of others users of the same registry. The severity of the vulnerability is **low**, due to the extremely niche requirements needed to achieve the attack.","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 can be coerced to share credentials between registries","id":"CVE-2026-5222","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"information_disclosure","year":"2026"},"n_packages":2,"n_references":3,"next":{"headline":"Crates in third party registries can override the cached source of other crates","id":"CVE-2026-5223"},"packages":[{"ecosystem":"crates.io","fixed":["0.97.0"],"introduced":["0"],"last_affected":[],"package":"cargo","purl":null,"source":"GHSA-p688-r7jv-fm6f"},{"ecosystem":"crates.io","fixed":["0.97.0"],"introduced":["0"],"last_affected":[],"package":"cargo","purl":"pkg:cargo/cargo","source":"GHSA-p688-r7jv-fm6f"}],"prev":{"headline":"Stored XSS in DivvyDrive Information Technologies' DivvyDrive","id":"CVE-2026-5220"},"products":["Cargo"],"published":"2026-05-25","related":[{"cvss_score":6.5,"headline":"Crates in third party registries can override the cached source of other crates","id":"CVE-2026-5223","kev_date_added":null,"published":"2026-05-25"},{"cvss_score":5.3,"headline":"Cargo did not verify SSH host keys","id":"CVE-2022-46176","kev_date_added":null,"published":"2023-01-11"},{"cvss_score":4.8,"headline":"Extracting malicious crates can fill the file system","id":"CVE-2022-36114","kev_date_added":null,"published":"2022-09-14"},{"cvss_score":4.6,"headline":"Extracting malicious crates can corrupt arbitrary files","id":"CVE-2022-36113","kev_date_added":null,"published":"2022-09-14"}],"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":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-05-26","vendors":["Rust"]},"summary":"Attackers can steal registry credentials by exploiting URL normalization flaws in Cargo when multiple registries share a domain.","url":"https://insights.sbomify.com/CVE-2026-5222/"}