CVE-2026-5222
Cargo between 1.68 and 1.96 incorrectly normalized the URLs of …
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.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- blog.rust-lang.org/2026/05/25/cve-2026-5222/
- github.com/rust-lang/cargo/pull/17031
- groups.google.com/g/rustlang-security-announcements/c/SfUxOiIdY5s
- github.com/rust-lang/cargo/security/advisories/GHSA-p688-r7jv-fm6f
- nvd.nist.gov/vuln/detail/CVE-2026-5222
- blog.rust-lang.org/2026/05/25/cve-2026-5222
- github.com/advisories/GHSA-p688-r7jv-fm6f
- nvd.nist.gov/vuln/detail/CVE-2026-5222
- cve.org/CVERecord?id=CVE-2026-5222
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.