Vulnerability 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.
CVSS Score
MEDIUM
Affected Products
| Vendor | Product | Versions |
|---|---|---|
| Rust-Lang | Cargo | >= 1.68.0, < 1.96.0 |
Related Weaknesses (CWE)
References
- https://blog.rust-lang.org/2026/05/25/cve-2026-5222/Vendor Advisory
- https://github.com/rust-lang/cargo/pull/17031Issue TrackingPatch
- https://groups.google.com/g/rustlang-security-announcements/c/SfUxOiIdY5sMailing ListThird Party Advisory
FAQ
What is CVE-2026-5222?
CVE-2026-5222 is a vulnerability with a CVSS score of 6.5 (MEDIUM). 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 nam...
How severe is CVE-2026-5222?
CVE-2026-5222 has been rated MEDIUM with a CVSS base score of 6.5/10. Review the CVSS metrics above for detailed severity breakdown.
Is there a patch for CVE-2026-5222?
Check the references section above for vendor advisories and patch information. Affected products include: Rust-Lang Cargo.