{"id":"CVE-2026-5222","state":"PUBLISHED","title":"Cargo can be coerced to share credentials between registries","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.","publishedAt":"2026-05-25T08:54:56.348Z","updatedAt":"2026-05-26T14:43:10.019Z","severity":{"score":2.3,"label":"Low","version":"4.0","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","source":"rust"},"assigner":"rust","products":["Rust Cargo"],"affected":[{"vendor":"Rust","product":"Cargo","packageName":"cargo","defaultStatus":"unaffected","versions":[{"version":"1.68.0","status":"affected","lessThan":"1.96.0","versionType":"semver"}],"collectionURL":"https://crates.io","repo":"https://github.com/rust-lang/cargo","modules":["sparse index"]}],"references":["https://groups.google.com/g/rustlang-security-announcements/c/SfUxOiIdY5s","https://blog.rust-lang.org/2026/05/25/cve-2026-5222/","https://github.com/rust-lang/cargo/pull/17031"],"weaknesses":["CWE-647"],"ingestedAt":"2026-10-29T20:12:32.778Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/5xxx/CVE-2026-5222.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-5222","state":"PUBLISHED","datePublished":"2026-05-25T08:54:56.348Z","dateUpdated":"2026-05-26T14:43:10.019Z","assignerShortName":"rust","assignerOrgId":"986d4109-89ea-491f-99fd-a8e4803919bd","dateReserved":"2026-03-31T12:07:40.168Z"},"containers":{"cna":{"title":"Cargo can be coerced to share credentials between registries","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Rust","product":"Cargo","packageName":"cargo","defaultStatus":"unaffected","versions":[{"version":"1.68.0","status":"affected","lessThan":"1.96.0","versionType":"semver"}],"collectionURL":"https://crates.io","repo":"https://github.com/rust-lang/cargo","modules":["sparse index"]}],"references":[{"url":"https://groups.google.com/g/rustlang-security-announcements/c/SfUxOiIdY5s","tags":["vendor-advisory","mailing-list"]},{"url":"https://blog.rust-lang.org/2026/05/25/cve-2026-5222/","tags":["vendor-advisory"]},{"url":"https://github.com/rust-lang/cargo/pull/17031","tags":["patch"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"PASSIVE","vulnConfidentialityImpact":"LOW","subConfidentialityImpact":"LOW","vulnIntegrityImpact":"NONE","subIntegrityImpact":"NONE","vulnAvailabilityImpact":"NONE","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","version":"4.0","baseSeverity":"LOW","baseScore":2.3,"vectorString":"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"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-647","lang":"en","description":"CWE-647 Use of Non-Canonical URL paths for authorization decisions","type":"CWE"}]}],"providerMetadata":{"shortName":"rust","orgId":"986d4109-89ea-491f-99fd-a8e4803919bd","dateUpdated":"2026-05-25T08:54:56.348Z"},"solutions":[{"lang":"en","value":"Rust 1.96, to be released on May 28th, 2026, will update Cargo to only strip the `.git` suffix from registry URLs using the git protocol. No mitigations are available for users of older versions of Cargo.","supportingMedia":[{"type":"text/html","base64":false,"value":"Rust 1.96, to be released on May 28th, 2026, will update Cargo to only strip the `.git` suffix from registry URLs using the git protocol. No mitigations are available for users of older versions of Cargo."}]}],"source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"Vulnogram 1.0.2"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-05-26T14:36:59.303136Z","id":"CVE-2026-5222","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-05-26T14:43:10.019Z"}}]}}}