Cargo can be coerced to share credentials between registries
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- —
- Confidentiality · integrity · availability
- Low · None · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| rust | Cargo | 1.68.0 to before 1.96.0 | 1.96.0 | Patch available | CNA |
| — | cargo (crates.io) | before 0.97.0 | 0.97.0 | Patch available | GHSA-p688-r7jv-fm6f |
- Cargo Vendorrust Affected 1.68.0 to before 1.96.0 Fixed in 1.96.0 Patch available CNA
- cargo (crates.io) Vendor— Affected before 0.97.0 Fixed in 0.97.0 Patch available GHSA-p688-r7jv-fm6f
Remediation
- Fix · CNA Cargo (Rust) Fixed in 1.96.0
- Fix · GHSA-p688-r7jv-fm6f cargo (crates.io) Fixed in 0.97.0 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2026-5222
- 2026-10-03 Alias added: GHSA-p688-r7jv-fm6f
References
Advisory 3
More rust vulnerabilities
- TI-2026-65509 pageant: Out-of-bounds read / oversized allocation in `pageant` MemoryMap::read via a malicious Pageant agent (Windows) CVSS 3.1MEDIUM 6.2
Sources
- CVE-2026-5222 · CVE Program
- CVE-2026-5222 · NVD
- FIRST EPSS
- GHSA-p688-r7jv-fm6f · GitHub Advisory Database · CC BY 4.0
- CVE-2026-5222 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences