Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

Cargo can be coerced to share credentials between registries

CVSS 4.0 2.3 LOWEUVD CVSS 4.0 2.3 CVSS 4.0 · 986d4109-89ea-491f-99fd-a8e4803919bd · Secondary 2.3 LOWCVSS 3.1 · [email protected] · Primary 6.5 MEDIUMCVSS_V4 Publisher rating LOWFixed by cargo 0.97.0KEV status unknown

cve-program · CVE-2026-5222

Published

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.

Read the publisher's advisory

euvd · EUVD-2026-31654

Published

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.

Read the publisher's advisory

nvd · CVE-2026-5222

Published

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.

Read the publisher's advisory

osv · GHSA-p688-r7jv-fm6f

Published

The Rust Security Response Team was notified that Cargo incorrectly normalized the URLs of third-party registries using the [sparse index protocol][1]. 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. This vulnerability is tracked as CVE-2026-5222. The severity of the vulnerability is **low**, due to the extremely niche requirements needed to achieve the attack. ## Overview Originally Cargo only supported storing a registry's index within git repositories. Most git hosting solutions allow accessing a git repository with or without the `.git` suffix, so Cargo mirrored this behavior when normalizing registry URLs. This allowed credentials for `https://example.com/index` to be used for `https://example.com/index.git`. This normalization was unintentionally applied to the new sparse indexes too. Sparse indexes can be hosted on any HTTPS server, which treat URLs ending with `.git` as different URLs than those without the suffix. If the following conditions apply: * `https://example.com/index` is a sparse index. * `https://example.com/index` allows crates to depend on crates from any other registry. * The attacker is able to publish crates on `https://example.com/index`. * The attacker is able to upload arbitrary files to `https://example.com/index.git`. ...the attacker could configure `https://example.com/index.git` to be a Cargo sparse registry requiring authentication for downloads, and with a download URL pointing to a server recording any credentials set to it. When the attacker then publishes a crate `foo` to `https://example.com/index` depending on a crate `bar` from `https://example.com/index.git`, and tricks the victim into downloading `foo`, Cargo will think the two registries share the same credential and send the victim's Cargo token to the malicious registry. ## Mitigations 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. ## Affected versions All versions of Cargo shipped between Rust 1.68 (the stabilization of sparse registries) and 1.96 are affected. ## Acknowledgements Cargo would like to thank Christos Papakonstantinou for reporting this issue according to the [Rust security policy][2]. Cargo also wants to thank the members of the Rust project who helped address the vulnerability: Arlo Siemens for developing the fix; Weihang Lo, Eric Huss and Emily Albini for reviewing the fix; Emily Albini for writing this advisory; Emily Albini, Josh Stone and Manish Goregaokar for coordinating the disclosure. [1]: https://doc.rust-lang.org/cargo/reference/registries.html#registry-protocols [2]: https://rust-lang.org/policies/security

Read the publisher's advisory

Affected versions, risk and source history

cve-program · CVE-2026-5222

Published

cargo

https://crates.io

Publisher's version information

Shown as published. These rules are not interpreted as NuGet package version ranges.

{
                    "vendor": "Rust",
                    "product": "Cargo",
                    "collectionURL": "https://crates.io",
                    "packageName": "cargo",
                    "repo": "https://github.com/rust-lang/cargo",
                    "modules": [
                        "sparse index"
                    ],
                    "versions": [
                        {
                            "status": "affected",
                            "version": "1.68.0",
                            "lessThan": "1.96.0",
                            "versionType": "semver"
                        }
                    ],
                    "defaultStatus": "unaffected"
                }

Original source record · Cite this exact observation · Complete original publisher JSON

euvd · EUVD-2026-31654

Published

EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.

Original publisher date fields

datePublished: May 25, 2026, 8:54:56 AM

dateUpdated: May 26, 2026, 2:43:10 PM

1 related source bulletins · separate from aliases

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

CVE-2026-5222

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

nvd · CVE-2026-5222

Published

NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.

Source analysis status: Analyzed

Weakness classifications: CWE-647

Original publisher date fields

published: 2026-05-25T10:16:15.273

lastModified: 2026-07-23T17:10:00.123

1 source CPE criteria · context only
  • cpe:2.3:a:rust-lang:cargo:*:*:*:*:*:rust:*:*

The original JSON retains the logical configuration operators, exclusions and version bounds.

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

osv · GHSA-p688-r7jv-fm6f

Published

cargo

crates.io

SEMVER · introduced 0 → fixed 0.97.0

Original source record · Cite this exact observation · Complete original publisher JSON

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 24 Nov 05:33 UTC · 274 of 275 readable · 270 fully read · documentation 469/469 current