CVE-2026-5222Rust-lang Cargo
Low 2.3 No auth needed
Follow: this CVE · Rust-lang · Rust-lang Cargo We alert you by email or Slack (account required).
- Priority
- 29
- CVSS 4.0
- 2.3
- EPSS
- —
- Auth required
- No
- Published
- May 25, 2026
- Updated
- Jul 23, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-647
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
What happens
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
- Apply the vendor's security update for Cargo.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| crates.io | cargo |
< 0.97.0 |
0.97.0 |
cargo update -p cargo --precise 0.97.0 |
Per OSV / GitHub Advisories (GHSA-p688-r7jv-fm6f). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| rust-lang | cargo | ≥ 1.68.0 < 1.96.0 |
Official sources
References
Links published by the sources. Open them with care.
- blog.rust-lang.org Vendor Advisory
- github.com Issue Tracking Patch
- groups.google.com Mailing List Third Party Advisory