{"id":"CVE-2026-5222","published":"2026-05-25T08:54:56Z","modified":"2026-05-26T14:43:10Z","title":"Cargo can be coerced to share credentials between registries","vendor":"Rust","product":"Cargo","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":2.3,"severity":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00478,"percentile":0.42154,"provenance":"source"},"cwes":[{"id":"CWE-647","name":"Use of Non-Canonical URL Paths for Authorization Decisions"}],"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"]}],"priority":{"score":10.0,"factors":[{"name":"EPSS percentile","points":8.43},{"name":"CVSS severity","points":1.61}]},"vendorSlug":"rust","affectedVersions":[{"vendor":"Rust","product":"Cargo","versions":[">= 1.68.0, < 1.96.0"]}],"solutions":{"items":["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."],"from":"CVE.org CNA","provenance":"source"},"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-05-26T14:36:59.303136Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"crates.io","package":"cargo","vulnerableRanges":["<0.97.0"],"patched":["0.97.0"],"from":["GHSA-p688-r7jv-fm6f"],"provenance":"source"}],"summary":{"text":"Cargo, Rust's package manager, incorrectly normalizes the URLs of third-party registries that use the sparse index protocol, affecting versions 1.68 through 1.96. An attacker who can publish crates to a registry hosted on a provider that allows multiple registries with arbitrary names under the same domain could obtain the credentials of other users of that registry, but this requires a user to interact with the attacker's registry and the provider to permit such naming, a configuration that is uncommon in practice.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:09:48Z"},"euvd":{"id":"EUVD-2026-31654","exploited":false,"provenance":"source"}}