Vulnerability · Published May 25, 2026 · Assigned by rust
CVE-2026-5222Cargo can be coerced to share credentials between registries
Low 2.3
In plain English
A low-severity security flaw in Cargo from Rust. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 41% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.24 | chromium-rust | 1.96.0-r0 | ALPINE-CVE-2026-5222 |
| Alpine:v3.23 | rust | 1.91.1-r2 | ALPINE-CVE-2026-5222 |
| Alpine:v3.24 | rust | 1.96.0-r0 | ALPINE-CVE-2026-5222 |
| Debian:12 | cargo | no fix listed | DEBIAN-CVE-2026-5222 |
| Debian:12 | rust-cargo | no fix listed | DEBIAN-CVE-2026-5222 |
| Debian:13 | rust-cargo | no fix listed | DEBIAN-CVE-2026-5222 |
| Debian:14 | rust-cargo | 0.91.0-3 | DEBIAN-CVE-2026-5222 |
| Debian:12 | rustc | no fix listed | DEBIAN-CVE-2026-5222 |
| Debian:13 | rustc | 1.85.1+dfsg1-1+deb13u1 | DEBIAN-CVE-2026-5222 |
| Debian:14 | rustc | 1.95.0+dfsg1-2 | DEBIAN-CVE-2026-5222 |
| Ubuntu:22.04:LTS | rustc | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:24.04:LTS | rustc | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:22.04:LTS | rustc-1.62 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:24.04:LTS | rustc-1.74 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:22.04:LTS | rustc-1.76 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:24.04:LTS | rustc-1.76 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:22.04:LTS | rustc-1.77 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:24.04:LTS | rustc-1.77 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:22.04:LTS | rustc-1.78 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:24.04:LTS | rustc-1.78 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:22.04:LTS | rustc-1.79 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:24.04:LTS | rustc-1.79 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:22.04:LTS | rustc-1.80 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:24.04:LTS | rustc-1.80 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:22.04:LTS | rustc-1.81 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:24.04:LTS | rustc-1.81 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:22.04:LTS | rustc-1.82 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:24.04:LTS | rustc-1.82 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:22.04:LTS | rustc-1.83 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:24.04:LTS | rustc-1.83 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:22.04:LTS | rustc-1.84 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:24.04:LTS | rustc-1.84 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:22.04:LTS | rustc-1.85 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:24.04:LTS | rustc-1.85 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:25.10 | rustc-1.85 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:25.10 | rustc-1.88 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:22.04:LTS | rustc-1.89 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:24.04:LTS | rustc-1.89 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:22.04:LTS | rustc-1.91 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:24.04:LTS | rustc-1.91 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:25.10 | rustc-1.91 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:26.04:LTS | rustc-1.91 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:26.04:LTS | rustc-1.92 | no fix listed | UBUNTU-CVE-2026-5222 |
| Ubuntu:26.04:LTS | rustc-1.93 | no fix listed | UBUNTU-CVE-2026-5222 |
Affected products (as reported)
Weakness: CWE-647 · Vector: 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
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