CVE-2026-5222 Details
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.
A vulnerability in Cargo versions 1.68 prior to 1.96 has been identified, where the normalization of URLs for third-party registries using the sparse index protocol was handled incorrectly. This issue arises when a hosting provider permits multiple registries to be hosted under the same domain with arbitrary names. An attacker who can publish crates in a registry could potentially access the credentials of other users within the same registry. The vulnerability's severity is considered low, given the very specific conditions required for exploitation.
Users can update to Cargo version 1.96 or later, which addresses this vulnerability by correcting the URL normalization process for registries using the git protocol. No remediation is available for users of earlier Cargo versions.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed May 26, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://blog.rust-lang.org/2026/05/25/cve-2026-5222/ | rust | Vendor Advisory |
| https://github.com/rust-lang/cargo/pull/17031 | rust | Issue TrackingPatch |
| https://groups.google.com/g/rustlang-security-announcements/c/SfUxOiIdY5s | rust | Mailing ListThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-647 | Use of Non-Canonical URL Paths for Authorization Decisions | rust |
Affected Products
| Product | Versions |
|---|---|
| rust-lang cargo | >= 1.68.0, < 1.96.0 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 23, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | rust |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 1, 2026 | Initial Analysis | [email protected] |
| May 25, 2026 | New CVE Received | rust |