CVE-2026-5222 (GCVE-0-2026-5222)

Vulnerability from cvelistv5 – Published: 2026-05-25 08:54 – Updated: 2026-05-26 14:43
VLAI
Title
Cargo can be coerced to share credentials between registries
Summary
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.
SSVC
Exploitation: none Automatable: no Technical Impact: partial
CISA Coordinator (v2.0.3)
CWE
  • CWE-647 - Use of Non-Canonical URL paths for authorization decisions
Assigner
Impacted products
Vendor Product Version
Rust Cargo Affected: 1.68.0 , < 1.96.0 (semver)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2026-5222",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2026-05-26T14:36:59.303136Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2026-05-26T14:43:10.019Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "collectionURL": "https://crates.io",
          "defaultStatus": "unaffected",
          "modules": [
            "sparse index"
          ],
          "packageName": "cargo",
          "product": "Cargo",
          "repo": "https://github.com/rust-lang/cargo",
          "vendor": "Rust",
          "versions": [
            {
              "lessThan": "1.96.0",
              "status": "affected",
              "version": "1.68.0",
              "versionType": "semver"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "\u003cdiv\u003eCargo 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.\u0026nbsp;The severity of the vulnerability is **low**, due to the extremely niche requirements needed to achieve the attack.\u003c/div\u003e"
            }
          ],
          "value": "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."
        }
      ],
      "metrics": [
        {
          "cvssV4_0": {
            "Automatable": "NOT_DEFINED",
            "Recovery": "NOT_DEFINED",
            "Safety": "NOT_DEFINED",
            "attackComplexity": "LOW",
            "attackRequirements": "PRESENT",
            "attackVector": "NETWORK",
            "baseScore": 2.3,
            "baseSeverity": "LOW",
            "exploitMaturity": "NOT_DEFINED",
            "privilegesRequired": "NONE",
            "providerUrgency": "NOT_DEFINED",
            "subAvailabilityImpact": "NONE",
            "subConfidentialityImpact": "LOW",
            "subIntegrityImpact": "NONE",
            "userInteraction": "PASSIVE",
            "valueDensity": "NOT_DEFINED",
            "vectorString": "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",
            "version": "4.0",
            "vulnAvailabilityImpact": "NONE",
            "vulnConfidentialityImpact": "LOW",
            "vulnIntegrityImpact": "NONE",
            "vulnerabilityResponseEffort": "NOT_DEFINED"
          },
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-647",
              "description": "CWE-647 Use of Non-Canonical URL paths for authorization decisions",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-05-25T08:54:56.348Z",
        "orgId": "986d4109-89ea-491f-99fd-a8e4803919bd",
        "shortName": "rust"
      },
      "references": [
        {
          "tags": [
            "vendor-advisory",
            "mailing-list"
          ],
          "url": "https://groups.google.com/g/rustlang-security-announcements/c/SfUxOiIdY5s"
        },
        {
          "tags": [
            "vendor-advisory"
          ],
          "url": "https://blog.rust-lang.org/2026/05/25/cve-2026-5222/"
        },
        {
          "tags": [
            "patch"
          ],
          "url": "https://github.com/rust-lang/cargo/pull/17031"
        }
      ],
      "solutions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "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."
            }
          ],
          "value": "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."
        }
      ],
      "source": {
        "discovery": "UNKNOWN"
      },
      "title": "Cargo can be coerced to share credentials between registries",
      "x_generator": {
        "engine": "Vulnogram 1.0.2"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "986d4109-89ea-491f-99fd-a8e4803919bd",
    "assignerShortName": "rust",
    "cveId": "CVE-2026-5222",
    "datePublished": "2026-05-25T08:54:56.348Z",
    "dateReserved": "2026-03-31T12:07:40.168Z",
    "dateUpdated": "2026-05-26T14:43:10.019Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-5222",
      "date": "2026-07-26",
      "epss": "0.00379",
      "percentile": "0.30519"
    },
    "microsoft_vex": {
      "current_release_date": "2026-06-13T01:42:39.000Z",
      "cve": "CVE-2026-5222",
      "id": "msrc_CVE-2026-5222",
      "initial_release_date": "2026-05-02T00:00:00.000Z",
      "product_status:fixed": "2",
      "product_status:known_affected": "4",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "Cargo can be coerced to share credentials between registries",
      "url": "https://msrc.microsoft.com/csaf/vex/2026/msrc_cve-2026-5222.json",
      "version": "4"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-5222\",\"sourceIdentifier\":\"986d4109-89ea-491f-99fd-a8e4803919bd\",\"published\":\"2026-05-25T10:16:15.273\",\"lastModified\":\"2026-07-23T17:10:00.123\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"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.\"},{\"lang\":\"es\",\"value\":\"Cargo entre 1.68 y 1.96 normaliz\u00f3 incorrectamente las URL de registros de terceros utilizando el protocolo de \u00edndice disperso. Si un proveedor de alojamiento permit\u00eda que se alojaran m\u00faltiples registros con nombres arbitrarios dentro del mismo dominio, un atacante capaz de publicar crates en un registro podr\u00eda obtener las credenciales de otros usuarios del mismo registro. La gravedad de la vulnerabilidad es baja, debido a los requisitos extremadamente espec\u00edficos necesarios para lograr el ataque.\"}],\"affected\":[{\"source\":\"986d4109-89ea-491f-99fd-a8e4803919bd\",\"affectedData\":[{\"vendor\":\"Rust\",\"product\":\"Cargo\",\"defaultStatus\":\"unaffected\",\"collectionURL\":\"https://crates.io\",\"packageName\":\"cargo\",\"modules\":[\"sparse index\"],\"repo\":\"https://github.com/rust-lang/cargo\",\"versions\":[{\"version\":\"1.68.0\",\"lessThan\":\"1.96.0\",\"versionType\":\"semver\",\"status\":\"affected\"}]}]}],\"metrics\":{\"cvssMetricV40\":[{\"source\":\"986d4109-89ea-491f-99fd-a8e4803919bd\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"4.0\",\"vectorString\":\"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\",\"baseScore\":2.3,\"baseSeverity\":\"LOW\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"attackRequirements\":\"PRESENT\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"PASSIVE\",\"vulnConfidentialityImpact\":\"LOW\",\"vulnIntegrityImpact\":\"NONE\",\"vulnAvailabilityImpact\":\"NONE\",\"subConfidentialityImpact\":\"LOW\",\"subIntegrityImpact\":\"NONE\",\"subAvailabilityImpact\":\"NONE\",\"exploitMaturity\":\"NOT_DEFINED\",\"confidentialityRequirement\":\"NOT_DEFINED\",\"integrityRequirement\":\"NOT_DEFINED\",\"availabilityRequirement\":\"NOT_DEFINED\",\"modifiedAttackVector\":\"NOT_DEFINED\",\"modifiedAttackComplexity\":\"NOT_DEFINED\",\"modifiedAttackRequirements\":\"NOT_DEFINED\",\"modifiedPrivilegesRequired\":\"NOT_DEFINED\",\"modifiedUserInteraction\":\"NOT_DEFINED\",\"modifiedVulnConfidentialityImpact\":\"NOT_DEFINED\",\"modifiedVulnIntegrityImpact\":\"NOT_DEFINED\",\"modifiedVulnAvailabilityImpact\":\"NOT_DEFINED\",\"modifiedSubConfidentialityImpact\":\"NOT_DEFINED\",\"modifiedSubIntegrityImpact\":\"NOT_DEFINED\",\"modifiedSubAvailabilityImpact\":\"NOT_DEFINED\",\"Safety\":\"NOT_DEFINED\",\"Automatable\":\"NOT_DEFINED\",\"Recovery\":\"NOT_DEFINED\",\"valueDensity\":\"NOT_DEFINED\",\"vulnerabilityResponseEffort\":\"NOT_DEFINED\",\"providerUrgency\":\"NOT_DEFINED\"}}],\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N\",\"baseScore\":6.5,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"NONE\"},\"exploitabilityScore\":2.8,\"impactScore\":3.6}],\"ssvcV203\":[{\"source\":\"134c704f-9b21-4f2e-91b3-4a467353bcc0\",\"ssvcData\":{\"timestamp\":\"2026-05-26T14:36:59.303136Z\",\"id\":\"CVE-2026-5222\",\"options\":[{\"exploitation\":\"none\"},{\"automatable\":\"no\"},{\"technicalImpact\":\"partial\"}],\"role\":\"CISA Coordinator\",\"version\":\"2.0.3\"}}]},\"weaknesses\":[{\"source\":\"986d4109-89ea-491f-99fd-a8e4803919bd\",\"type\":\"Secondary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-647\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:rust-lang:cargo:*:*:*:*:*:rust:*:*\",\"versionStartIncluding\":\"1.68.0\",\"versionEndExcluding\":\"1.96.0\",\"matchCriteriaId\":\"143A0C07-6AA8-4711-A789-152DA178214C\"}]}]}],\"references\":[{\"url\":\"https://blog.rust-lang.org/2026/05/25/cve-2026-5222/\",\"source\":\"986d4109-89ea-491f-99fd-a8e4803919bd\",\"tags\":[\"Vendor Advisory\"]},{\"url\":\"https://github.com/rust-lang/cargo/pull/17031\",\"source\":\"986d4109-89ea-491f-99fd-a8e4803919bd\",\"tags\":[\"Issue Tracking\",\"Patch\"]},{\"url\":\"https://groups.google.com/g/rustlang-security-announcements/c/SfUxOiIdY5s\",\"source\":\"986d4109-89ea-491f-99fd-a8e4803919bd\",\"tags\":[\"Mailing List\",\"Third Party Advisory\"]}]}}",
    "redhat_vex": {
      "current_release_date": "2026-06-28T11:12:50+00:00",
      "cve": "CVE-2026-5222",
      "id": "CVE-2026-5222",
      "initial_release_date": "2026-05-25T08:54:56.348000+00:00",
      "product_status:known_not_affected": "1",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "rust-cargo: rust-cargo: Information disclosure due to URL normalization flaw",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-5222.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "low",
      "current_release_date": "2026-06-02T01:45:08Z",
      "cve": "CVE-2026-5222",
      "id": "CVE-2026-5222",
      "initial_release_date": "2026-05-27T10:59:50Z",
      "product_status:known_affected": "80",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2026-5222",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2026-5222.json",
      "version": "3"
    },
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2026-5222\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2026-05-26T14:36:59.303136Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2026-05-26T14:43:04.959Z\"}}], \"cna\": {\"title\": \"Cargo can be coerced to share credentials between registries\", \"source\": {\"discovery\": \"UNKNOWN\"}, \"metrics\": [{\"format\": \"CVSS\", \"cvssV4_0\": {\"Safety\": \"NOT_DEFINED\", \"version\": \"4.0\", \"Recovery\": \"NOT_DEFINED\", \"baseScore\": 2.3, \"Automatable\": \"NOT_DEFINED\", \"attackVector\": \"NETWORK\", \"baseSeverity\": \"LOW\", \"valueDensity\": \"NOT_DEFINED\", \"vectorString\": \"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\", \"exploitMaturity\": \"NOT_DEFINED\", \"providerUrgency\": \"NOT_DEFINED\", \"userInteraction\": \"PASSIVE\", \"attackComplexity\": \"LOW\", \"attackRequirements\": \"PRESENT\", \"privilegesRequired\": \"NONE\", \"subIntegrityImpact\": \"NONE\", \"vulnIntegrityImpact\": \"NONE\", \"subAvailabilityImpact\": \"NONE\", \"vulnAvailabilityImpact\": \"NONE\", \"subConfidentialityImpact\": \"LOW\", \"vulnConfidentialityImpact\": \"LOW\", \"vulnerabilityResponseEffort\": \"NOT_DEFINED\"}, \"scenarios\": [{\"lang\": \"en\", \"value\": \"GENERAL\"}]}], \"affected\": [{\"repo\": \"https://github.com/rust-lang/cargo\", \"vendor\": \"Rust\", \"modules\": [\"sparse index\"], \"product\": \"Cargo\", \"versions\": [{\"status\": \"affected\", \"version\": \"1.68.0\", \"lessThan\": \"1.96.0\", \"versionType\": \"semver\"}], \"packageName\": \"cargo\", \"collectionURL\": \"https://crates.io\", \"defaultStatus\": \"unaffected\"}], \"solutions\": [{\"lang\": \"en\", \"value\": \"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.\", \"supportingMedia\": [{\"type\": \"text/html\", \"value\": \"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.\", \"base64\": false}]}], \"references\": [{\"url\": \"https://groups.google.com/g/rustlang-security-announcements/c/SfUxOiIdY5s\", \"tags\": [\"vendor-advisory\", \"mailing-list\"]}, {\"url\": \"https://blog.rust-lang.org/2026/05/25/cve-2026-5222/\", \"tags\": [\"vendor-advisory\"]}, {\"url\": \"https://github.com/rust-lang/cargo/pull/17031\", \"tags\": [\"patch\"]}], \"x_generator\": {\"engine\": \"Vulnogram 1.0.2\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"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.\", \"supportingMedia\": [{\"type\": \"text/html\", \"value\": \"\u003cdiv\u003eCargo 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.\u0026nbsp;The severity of the vulnerability is **low**, due to the extremely niche requirements needed to achieve the attack.\u003c/div\u003e\", \"base64\": false}]}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-647\", \"description\": \"CWE-647 Use of Non-Canonical URL paths for authorization decisions\"}]}], \"providerMetadata\": {\"orgId\": \"986d4109-89ea-491f-99fd-a8e4803919bd\", \"shortName\": \"rust\", \"dateUpdated\": \"2026-05-25T08:54:56.348Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2026-5222\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-05-26T14:43:10.019Z\", \"dateReserved\": \"2026-03-31T12:07:40.168Z\", \"assignerOrgId\": \"986d4109-89ea-491f-99fd-a8e4803919bd\", \"datePublished\": \"2026-05-25T08:54:56.348Z\", \"assignerShortName\": \"rust\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…