CVE-2026-5222
Cargo can be coerced to share credentials between registries
- State
- Published
- Severity
- 2.3 Low
- Published
- May 25, 2026
- Updated
- May 26, 2026
- Reserved
- Mar 31, 2026
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.
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 4.0 | 2.3 Low | 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 | rust |
Weaknesses
- CWE-647 Use of Non-Canonical URL paths for authorization decisions
Affected Products
| Product | Versions |
|---|---|
CargoRust |
|
References
- https://groups.google.com/g/rustlang-security-announcements/c/SfUxOiIdY5svendor-advisorymailing-list
- https://blog.rust-lang.org/2026/05/25/cve-2026-5222/vendor-advisory
- https://github.com/rust-lang/cargo/pull/17031patch
Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.