{"id":"EUVD-2026-31654","revision":null,"records":[{"revision":"59c5642b07b4466eba297cad0b105ef5","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-5222","aliases":[],"title":"Cargo can be coerced to share credentials between registries","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.\u00A0The severity of the vulnerability is **low**, due to the extremely niche requirements needed to achieve the attack.","state":0,"publishedAt":"2026-05-25T08:54:56.348+00:00","modifiedAt":"2026-05-26T14:43:10.019+00:00","affected":[{"ecosystem":"https://crates.io","name":"cargo","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"Rust\",\n                    \"product\": \"Cargo\",\n                    \"collectionURL\": \"https://crates.io\",\n                    \"packageName\": \"cargo\",\n                    \"repo\": \"https://github.com/rust-lang/cargo\",\n                    \"modules\": [\n                        \"sparse index\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"status\": \"affected\",\n                            \"version\": \"1.68.0\",\n                            \"lessThan\": \"1.96.0\",\n                            \"versionType\": \"semver\"\n                        }\n                    ],\n                    \"defaultStatus\": \"unaffected\"\n                }"}],"metrics":[{"system":"CVSS 4.0","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","score":2.3,"severity":"LOW"}],"references":["https://groups.google.com/g/rustlang-security-announcements/c/SfUxOiIdY5s","https://blog.rust-lang.org/2026/05/25/cve-2026-5222/","https://github.com/rust-lang/cargo/pull/17031"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-5222","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-5222","identifiers":["CVE-2026-5222"]},"retained":false,"historicalAffected":[]},{"revision":"0cd11ac771784364b363720ed66656ce","observedAt":"2026-11-24T02:28:41.518+00:00","statement":{"source":"euvd","id":"EUVD-2026-31654","aliases":["CVE-2026-5222","GHSA-p688-r7jv-fm6f"],"title":"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 a…","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.\u00A0The severity of the vulnerability is **low**, due to the extremely niche requirements needed to achieve the attack.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 4.0","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","score":2.3,"severity":null}],"references":["https://groups.google.com/g/rustlang-security-announcements/c/SfUxOiIdY5s","https://blog.rust-lang.org/2026/05/25/cve-2026-5222/","https://github.com/rust-lang/cargo/pull/17031"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-31654","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"May 25, 2026, 8:54:56 AM","dateUpdated":"May 26, 2026, 2:43:10 PM"},"relatedAdvisories":[{"id":"msrc_CVE-2026-5222","title":"Cargo can be coerced to share credentials between registries","vulnerabilityIds":["CVE-2026-5222"]}],"note":"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."},"key":"euvd:EUVD-2026-31654","identifiers":["EUVD-2026-31654","CVE-2026-5222","GHSA-p688-r7jv-fm6f"]},"retained":false,"historicalAffected":[]},{"revision":"4a4f9273d76042c096579ac909aa03bb","observedAt":"2026-10-25T13:17:10.707+00:00","statement":{"source":"nvd","id":"CVE-2026-5222","aliases":[],"title":"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 a…","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.\u00A0The severity of the vulnerability is **low**, due to the extremely niche requirements needed to achieve the attack.","state":0,"publishedAt":"2026-05-25T10:16:15.273+00:00","modifiedAt":"2026-07-23T17:10:00.123+00:00","affected":[],"metrics":[{"system":"CVSS 4.0 · 986d4109-89ea-491f-99fd-a8e4803919bd · Secondary","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","score":2.3,"severity":"LOW"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"severity":"MEDIUM"}],"references":["https://blog.rust-lang.org/2026/05/25/cve-2026-5222/","https://github.com/rust-lang/cargo/pull/17031","https://groups.google.com/g/rustlang-security-announcements/c/SfUxOiIdY5s"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-5222","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-647"],"productCriteria":["cpe:2.3:a:rust-lang:cargo:*:*:*:*:*:rust:*:*"],"sourceDates":{"published":"2026-05-25T10:16:15.273","lastModified":"2026-07-23T17:10:00.123"},"relatedAdvisories":[],"note":"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."},"key":"nvd:CVE-2026-5222","identifiers":["CVE-2026-5222"]},"retained":false,"historicalAffected":[]},{"revision":"d1df3c8d936a47239817a1a47c9f5dde","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-p688-r7jv-fm6f","aliases":["CVE-2026-5222"],"title":"Cargo can be coerced to share credentials between registries","description":"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.\n\nThis 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.\n\n## Overview\n\nOriginally 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`.\n\nThis 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.\n\nIf the following conditions apply:\n\n* `https://example.com/index` is a sparse index.\n* `https://example.com/index` allows crates to depend on crates from any other registry.\n* The attacker is able to publish crates on `https://example.com/index`.\n* The attacker is able to upload arbitrary files to `https://example.com/index.git`.\n\n...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.\n\nWhen 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.\n\n## Mitigations\n\nRust 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.\n\n## Affected versions\n\nAll versions of Cargo shipped between Rust 1.68 (the stabilization of sparse registries) and 1.96 are affected.\n\n## Acknowledgements\n\nCargo would like to thank Christos Papakonstantinou for reporting this issue according to the [Rust security policy][2].\n\nCargo 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.\n\n[1]: https://doc.rust-lang.org/cargo/reference/registries.html#registry-protocols\n[2]: https://rust-lang.org/policies/security","state":0,"publishedAt":"2026-06-26T21:47:54+00:00","modifiedAt":"2026-06-26T22:11:30.823511+00:00","affected":[{"ecosystem":"crates.io","name":"cargo","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.97.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","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","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"LOW"}],"references":["https://github.com/rust-lang/cargo/security/advisories/GHSA-p688-r7jv-fm6f","https://nvd.nist.gov/vuln/detail/CVE-2026-5222","https://github.com/rust-lang/cargo/pull/17031","https://blog.rust-lang.org/2026/05/25/cve-2026-5222","https://github.com/rust-lang/cargo","https://groups.google.com/g/rustlang-security-announcements/c/SfUxOiIdY5s"],"sourceUrl":"https://github.com/advisories/GHSA-p688-r7jv-fm6f","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-p688-r7jv-fm6f","identifiers":["GHSA-p688-r7jv-fm6f","CVE-2026-5222"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-24T06:27:23.1283046+00:00","complete":true,"records":1792,"lastAttemptAt":"2026-11-24T06:27:23.1283046+00:00","lastSuccessAt":"2026-11-24T06:27:23.2869282+00:00","error":null,"lastVerifiedAt":"2026-11-24T06:27:23.2869283+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-f6e4a7f93ed9acd6fcb1f804a4567f7b9b16730ac126110af8d6d24176317946-a6ece4f9ff8c9985adfd8cfc655a594971f8e66bcf1a0e30038d5b5754f56054","complete":true,"records":431033,"lastAttemptAt":"2026-11-24T06:25:37.9863077+00:00","lastSuccessAt":"2026-11-24T06:25:37.91421+00:00","error":null,"lastVerifiedAt":"2026-11-24T06:25:37.9863077+00:00","snapshotPublishedAt":"2026-11-24T05:29:40+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-56af620a27a34b0c9aeb96f12a8895a8","complete":false,"records":13935,"lastAttemptAt":"2026-11-24T06:28:08.9791517+00:00","lastSuccessAt":"2026-11-24T06:28:09.0419756+00:00","error":null,"lastVerifiedAt":"2026-11-24T06:28:09.0419756+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-24T06:27:23.1283046+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-24T06:27:23.1283046+00:00","lastSuccessAt":"2026-11-24T06:27:23.287684+00:00","error":null,"lastVerifiedAt":"2026-11-24T06:27:23.2876841+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-4f9d2e805a9c49b79b35fea071c09495","complete":true,"records":13947,"lastAttemptAt":"2026-11-24T06:27:48.1138355+00:00","lastSuccessAt":"2026-11-24T06:27:48.11+00:00","error":null,"lastVerifiedAt":"2026-11-24T06:27:48.11+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13982,"expectedIdentifiers":13982,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-c86437892ddabdeaf17409463a17578b1e71dd185d64061100dd57629858f6d6","complete":true,"records":10074,"lastAttemptAt":"2026-11-24T06:27:23.0811519+00:00","lastSuccessAt":"2026-11-23T22:27:19.6557603+00:00","error":null,"lastVerifiedAt":"2026-11-24T06:27:23.0811519+00:00","snapshotPublishedAt":"2026-11-23T21:33:52+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-24T06:25:38.1424912+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-24T06:25:38.1424912+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-15e801f03affdaac7ba10268556f4d0b3e1b9f897dae85fdcade5fc30d25011c","complete":true,"records":3217,"lastAttemptAt":"2026-11-24T06:27:23.0944421+00:00","lastSuccessAt":"2026-11-23T17:27:41.2539213+00:00","error":null,"lastVerifiedAt":"2026-11-24T06:27:23.0944421+00:00","snapshotPublishedAt":"2026-11-23T16:18:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-d95e22bbd2354420d7a1502babde978c5df2a8a131d05ff19b21adc7da0ab0b6","complete":true,"records":232947,"lastAttemptAt":"2026-11-24T06:27:22.9517571+00:00","lastSuccessAt":"2026-11-24T06:27:21.8691292+00:00","error":null,"lastVerifiedAt":"2026-11-24T06:27:22.9517571+00:00","snapshotPublishedAt":"2026-11-24T06:04:19+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}