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

Published May 25, 2026
·
Updated

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.

Affected Software

1 affected component
Rust Cargo>=1.68<=1.96

Remediation

Information

Rust 1.96, to be released on May 28th, 2026, will update Cargo to only strip the `.git` suffix from registry URLs using the git protocol. No mitigations are available for users of older versions of Cargo.

Event History

May 25, 2026
CVE Published
via MITRE·08:54 AM
Data Sourced
via MITRE·08:54 AM
RemedyDescriptionWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-5222?

The severity of CVE-2026-5222 is rated as 15.

2

How do I fix CVE-2026-5222?

To fix CVE-2026-5222, upgrade to Rust Cargo version 1.96 or later when it is released on May 28th, 2026.

3

What versions of Cargo are affected by CVE-2026-5222?

Cargo versions from 1.68 to 1.96 are affected by CVE-2026-5222.

4

What kind of attack does CVE-2026-5222 enable?

CVE-2026-5222 allows an attacker to coerce Cargo into sharing credentials between different registries.

5

Is there a workaround for CVE-2026-5222?

No mitigations are available for users of older versions of Cargo prior to the release of version 1.96.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203
CVE-2026-5222 - Cargo can be coerced to share credentials between registries - SecAlerts