Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify multi-tenant sparse registry hosting provider
-
DeliveryRegister attacker-controlled registry at path colliding with victim's .git-suffixed URL
-
ExploitWait for victim to run Cargo operation against their registry
-
ExecutionCargo normalizes both registry URLs to identical canonical identifier
-
PersistCargo transmits victim's registry credentials to attacker endpoint
-
ImpactAttacker captures and reuses registry credentials
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V6 - Authentication Use of non-canonical URL paths
|
| Exploitation Conditions | Three specific conditions must simultaneously hold: (1) the victim must be using a third-party registry configured with the sparse index protocol (i.e., the registry URL begins with |
| Impact | All available signals converge on low real-world risk. The CVSS 4.0 score is 2.3, with AT:P (attack requirements: partial) directly reflecting the niche infrastructure conditions required. UI:P (user participation required) adds a further barrier. EPSS is 0.04% at the 12th percentile, indicating near-negligible automated exploitation likelihood. SSVC assesses exploitation as none and the attack as not automatable with only partial technical impact. The vulnerability is not listed in CISA KEV. The vendor's own advisory characterizes severity as low due to extremely niche requirements. The confidentiality impact is limited to registry credentials (VC:L, SC:L), with no integrity or availability impact. There is no conflict between signals - CVSS, EPSS, SSVC, and vendor assessment are all self-consistent. This is not a prioritization candidate for most organizations; risk is meaningful only to teams using sparse-protocol third-party registries hosted on multi-tenant providers that allow arbitrary registry path naming. |
| Exploit ScenarioDerived | An attacker who has publish access to a registry named |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 26, 2026
Credential leakage in Cargo's sparse index registry URL normalization affects all Cargo releases from 1.68 through 1.96. The flaw caused Cargo to incorrectly apply git-registry canonicalization rules - specifically, stripping .git suffixes and lowercasing GitHub paths - to sparse index protocol URLs (prefixed with sparse+). This allowed two distinct sparse registry URLs that differed only by a .git suffix to resolve to the same canonical identifier, meaning credentials configured for one registry could be transmitted to a different, attacker-controlled registry on the same domain. No public exploit identified at time of analysis; EPSS is 0.04% (12th percentile), consistent with the vendor-assessed low severity and SSVC exploitation status of none.
RemediationAI
Upgrade Cargo to a version beyond 1.96 that incorporates the fix from upstream pull request https://github.com/rust-lang/cargo/pull/17031. The exact first patched release version is not specified in the available advisory data - consult the official Rust release notes at https://blog.rust-lang.org/2026/05/25/cve-2026-5222/ for the confirmed fixed version. As a compensating control for environments that cannot upgrade immediately, organizations can avoid using sparse-protocol registries hosted on multi-tenant providers where arbitrary registry path names within the same domain are permitted; switching to dedicated domain hosting for private registries eliminates the URL collision surface entirely. Credential rotation for any sparse-protocol third-party registry credentials should be considered if the deployment matches the vulnerable hosting topology described in the advisory.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in cargo
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Cargo implements URL canonicalization in src/cargo/util/canonical_url.rs to produce stable, hashable identifiers for registries. For git-backed registries, stripping .git suffixes is semantically correct because git hosts typically serve the same repository at both repo and repo.git. However, for sparse index registries (identified by the sparse+https:// scheme containing a + character in the scheme), these paths are not git repos but HTTP endpoints where path components are meaningful and distinct. CWE-647 (Use of Non-Canonical URL Paths for Authorization Decisions) precisely describes this root cause: authorization/credential scoping decisions were based on a canonicalized URL that incorrectly collapsed two distinct registry identities into one. The fix in PR #17031 gates the .git-stripping and GitHub lowercasing logic on !url.scheme().contains('+'), ensuring sparse registry URLs are not subject to git-specific normalization. CPE: cpe:2.3:a:rust:cargo:*:*:*:*:*:*:*:*.
Know when Cargo gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Primary rating from Vendor (rust) · only source for this CVE.
CVSS VectorVendor: rust
Lifecycle Timeline
2DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') vulnerability in The Wikimedia Foun
Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in The Wikimed
Cross-Site Request Forgery (CSRF) vulnerability in The Wikimedia Foundation Mediawiki - Cargo allows Cross Site Request
Cargo is a package manager for the rust programming language. Rated high severity (CVSS 8.1), this vulnerability is remo
Cargo downloads the Rust project’s dependencies and compiles the project. Rated high severity (CVSS 7.3), this vulnerabi
Tarball unpacking in Rust's Cargo package manager fails to reject symlinks within downloaded crate archives, enabling a
Cargo is a package manager for the rust programming language. Rated medium severity (CVSS 6.5), this vulnerability is re
EUVD-2026-31654
GHSA-p688-r7jv-fm6f
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB