# CVE-2026-5222: Cargo can be coerced to share credentials between registries

- Priority: **Routine**
- Reason: Not severe (CVSS 2.3, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-05-25 · Modified: 2026-05-26
- Aliases: ALPINE-CVE-2026-5222, UBUNTU-CVE-2026-5222, DEBIAN-CVE-2026-5222, GHSA-p688-r7jv-fm6f
- Record: https://cvemate.com/vulnerability/CVE-2026-5222 · JSON: https://cvemate.com/vulnerability/CVE-2026-5222/json

## Description

```text
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.
```

## Signals

- CVSS: 6.5 medium (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- EPSS: 0.478%, percentile 42.887%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 27)

- alpine chromium-rust (Alpine Linux): \< 1.96.0-r0
- alpine rust (Alpine Linux): \< 1.91.1-r2 \| \< 1.96.0-r0
- Crates.Io cargo (Crates.Io): \< 0.97.0
- debian cargo (Debian): All versions (No fix recorded)
- debian rust-cargo (Debian): All versions (No fix recorded) \| \< 0.91.0-3
- debian rustc (Debian): All versions (No fix recorded) \| \< 1.85.1+dfsg1-1+deb13u1 \| \< 1.95.0+dfsg1-2
- ubuntu cargo (Ubuntu): All versions (No fix recorded)
- ubuntu rustc (Ubuntu): All versions (No fix recorded)
- ubuntu rustc-1.62 (Ubuntu): All versions (No fix recorded)
- ubuntu rustc-1.74 (Ubuntu): All versions (No fix recorded)
- ubuntu rustc-1.76 (Ubuntu): All versions (No fix recorded)
- ubuntu rustc-1.77 (Ubuntu): All versions (No fix recorded)
- ubuntu rustc-1.78 (Ubuntu): All versions (No fix recorded)
- ubuntu rustc-1.79 (Ubuntu): All versions (No fix recorded)
- ubuntu rustc-1.80 (Ubuntu): All versions (No fix recorded)
- ubuntu rustc-1.81 (Ubuntu): All versions (No fix recorded)
- ubuntu rustc-1.82 (Ubuntu): All versions (No fix recorded)
- ubuntu rustc-1.83 (Ubuntu): All versions (No fix recorded)
- ubuntu rustc-1.84 (Ubuntu): All versions (No fix recorded)
- ubuntu rustc-1.85 (Ubuntu): All versions (No fix recorded)

## References

- <https://groups.google.com/g/rustlang-security-announcements/c/SfUxOiIdY5s>
- <https://blog.rust-lang.org/2026/05/25/cve-2026-5222/>
- <https://github.com/rust-lang/cargo/pull/17031>
- <https://security.alpinelinux.org/vuln/CVE-2026-5222>
- <https://ubuntu.com/security/CVE-2026-5222>
- <https://www.cve.org/CVERecord?id=CVE-2026-5222>
- <https://security-tracker.debian.org/tracker/CVE-2026-5222>
- <https://github.com/rust-lang/cargo/security/advisories/GHSA-p688-r7jv-fm6f>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-5222>
- <https://blog.rust-lang.org/2026/05/25/cve-2026-5222>
- <https://github.com/rust-lang/cargo>

---

Data as of 2026-12-05T10:24:40.997Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
