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

- Severity: Low 2.3 (CVSS:4.0, scored by rust) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.48%, higher than 42% of CVEs (2026-12-01)
- Published: 2026-05-25T08:54:56.348Z
- Modified: 2026-07-23T17:10:00.123Z
- Also known as: GHSA-p688-r7jv-fm6f
- Weaknesses: CWE-647
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: rust

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

(As written by CVE List.)

## Affected

- cargo: from 1.68.0 before 1.96.0
- cargo (crates.io): before 0.97.0
- rust-lang cargo: from 1.68.0 before 1.96.0

## Every score

- rust: CVSS:4.0 2.3 Low `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`
- GitHub: CVSS:4.0 Low `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`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://groups.google.com/g/rustlang-security-announcements/c/SfUxOiIdY5s> (mailing-list, third-party-advisory, vendor-advisory, web)
- <https://blog.rust-lang.org/2026/05/25/cve-2026-5222/> (vendor-advisory)
- <https://github.com/rust-lang/cargo/pull/17031> (issue-tracking, patch, web)
- <https://github.com/rust-lang/cargo/security/advisories/GHSA-p688-r7jv-fm6f> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-5222> (advisory)
- <https://blog.rust-lang.org/2026/05/25/cve-2026-5222> (web)
- <https://github.com/rust-lang/cargo> (package)

## Sources

- CVE List: [CVE-2026-5222](https://www.cve.org/CVERecord?id=CVE-2026-5222), CVE Terms of Use, modified 2026-05-26
- GitHub Advisory Database: [GHSA-p688-r7jv-fm6f](https://github.com/advisories/GHSA-p688-r7jv-fm6f), CC-BY-4.0, modified 2026-06-26
- NVD: [CVE-2026-5222](https://nvd.nist.gov/vuln/detail/CVE-2026-5222), Public domain, modified 2026-07-23

---

Page: https://cve.day/CVE-2026-5222 · Whole record: https://cve.day/CVE-2026-5222.json · Rebuilt by cve.day 2026-11-25T22:59:22.263Z
