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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Rust | Cargo | 1.68.0 – < 1.96.0 | 1.96.0 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | rust-cargo | 0.91.0-3 | — |
| Debian 14 | rustc | 1.95.0+dfsg1-2 | — |
| Debian 13 | rust-cargo | No fix yet | — |
| Debian 13 | rustc | 1.85.1+dfsg1-1+deb13u1 | — |
| Debian 12 | cargo +2 | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.04 LTS | rustc-1.91 +2 | No fix yet | — |
| Ubuntu 25.10 | rustc-1.85 +2 | No fix yet | — |
| Ubuntu 24.04 LTS | rustc +13 | No fix yet | — |
| Ubuntu 22.04 LTS | rustc +13 | No fix yet | — |
Show 5 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 22.04 LTS | cargo | No fix yet | — |
| Ubuntu Pro 20.04 LTS | cargo +6 | No fix yet | — |
| Ubuntu Pro 18.04 LTS | cargo +1 | No fix yet | — |
| Ubuntu Pro 16.04 LTS | cargo +1 | No fix yet | — |
| Ubuntu Pro 14.04 LTS | rustc | No fix yet | — |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | rust +1 | 1.96.0-r0 | — |
| Alpine v3.23 | rust | 1.91.1-r2 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | cargo-c | 0.10.19-1.amzn2023.0.3 | ALAS2023-2026-1872 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | rust | 1.75.0-30 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| crates.io | cargo | < 0.97.0 | 0.97.0 | GHSA-p688-r7jv-fm6f |
Advisories 1
- ALAS2023-2026-1872 Moderate: rust-cargo-c security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Jun 22, 2026
References
- https://groups.google.com/g/rustlang-security-announcements/c/SfUxOiIdY5s vendor-advisory mailing-list
- https://blog.rust-lang.org/2026/05/25/cve-2026-5222/ vendor-advisory
- https://github.com/rust-lang/cargo/pull/17031 patch