CVEfocus › CVE database › CVE-2026-5222

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

CVSS 2.3 LowEPSS 0.5% (higher than 35% of CVEs)Published 2026-05-25Updated 2026-05-26Assigner: rust

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.

CWE-647

What to do

Fixed builds are available from Alpine, Debian, crates.io: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

7Fixed
17Fix pending
31Under investigation
3Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04rustc-1.91Under investigationUBUNTU-CVE-2026-5222
Ubuntu 26.04rustc-1.92Under investigationUBUNTU-CVE-2026-5222
Ubuntu 26.04rustc-1.93Under investigationUBUNTU-CVE-2026-5222
Ubuntu 25.10rustc-1.85Will not fix
cargo in mantic was merged into rustc
UBUNTU-CVE-2026-5222
Ubuntu 25.10rustc-1.88Will not fix
cargo in mantic was merged into rustc
UBUNTU-CVE-2026-5222
Ubuntu 25.10rustc-1.91Will not fix
cargo in mantic was merged into rustc
UBUNTU-CVE-2026-5222
Ubuntu 24.04rustcUnder investigationUBUNTU-CVE-2026-5222
Ubuntu 24.04rustc-1.74Under investigationUBUNTU-CVE-2026-5222
Ubuntu 24.04rustc-1.76Under investigationUBUNTU-CVE-2026-5222
Ubuntu 24.04rustc-1.77Under investigationUBUNTU-CVE-2026-5222
Ubuntu 24.04rustc-1.78Under investigationUBUNTU-CVE-2026-5222
Ubuntu 24.04rustc-1.79Under investigationUBUNTU-CVE-2026-5222
Ubuntu 24.04rustc-1.80Under investigationUBUNTU-CVE-2026-5222
Ubuntu 24.04rustc-1.81Under investigationUBUNTU-CVE-2026-5222
Ubuntu 24.04rustc-1.82Under investigationUBUNTU-CVE-2026-5222
Ubuntu 24.04rustc-1.83Under investigationUBUNTU-CVE-2026-5222
Ubuntu 24.04rustc-1.84Under investigationUBUNTU-CVE-2026-5222
Ubuntu 24.04rustc-1.85Under investigationUBUNTU-CVE-2026-5222
Ubuntu 24.04rustc-1.89Under investigationUBUNTU-CVE-2026-5222
Ubuntu 24.04rustc-1.91Under investigationUBUNTU-CVE-2026-5222
Ubuntu 22.04cargoFix pendingUBUNTU-CVE-2026-5222
Ubuntu 22.04rustcUnder investigationUBUNTU-CVE-2026-5222
Ubuntu 22.04rustc-1.62Under investigationUBUNTU-CVE-2026-5222
Ubuntu 22.04rustc-1.76Under investigationUBUNTU-CVE-2026-5222
Ubuntu 22.04rustc-1.77Under investigationUBUNTU-CVE-2026-5222
Ubuntu 22.04rustc-1.78Under investigationUBUNTU-CVE-2026-5222
Ubuntu 22.04rustc-1.79Under investigationUBUNTU-CVE-2026-5222
Ubuntu 22.04rustc-1.80Under investigationUBUNTU-CVE-2026-5222
Ubuntu 22.04rustc-1.81Under investigationUBUNTU-CVE-2026-5222
Ubuntu 22.04rustc-1.82Under investigationUBUNTU-CVE-2026-5222
Ubuntu 22.04rustc-1.83Under investigationUBUNTU-CVE-2026-5222
Ubuntu 22.04rustc-1.84Under investigationUBUNTU-CVE-2026-5222
Ubuntu 22.04rustc-1.85Under investigationUBUNTU-CVE-2026-5222
Ubuntu 22.04rustc-1.89Under investigationUBUNTU-CVE-2026-5222
Ubuntu 22.04rustc-1.91Under investigationUBUNTU-CVE-2026-5222
Ubuntu 20.04cargoFix pendingUBUNTU-CVE-2026-5222
Ubuntu 20.04rustcFix pendingUBUNTU-CVE-2026-5222
Ubuntu 20.04rustc-1.76Fix pendingUBUNTU-CVE-2026-5222
Ubuntu 20.04rustc-1.77Fix pendingUBUNTU-CVE-2026-5222
Ubuntu 20.04rustc-1.78Fix pendingUBUNTU-CVE-2026-5222
Ubuntu 20.04rustc-1.79Fix pendingUBUNTU-CVE-2026-5222
Ubuntu 20.04rustc-1.80Fix pendingUBUNTU-CVE-2026-5222
Ubuntu 18.04cargoFix pendingUBUNTU-CVE-2026-5222
Ubuntu 18.04rustcFix pendingUBUNTU-CVE-2026-5222
Ubuntu 16.04cargoFix pendingUBUNTU-CVE-2026-5222
Ubuntu 16.04rustcFix pendingUBUNTU-CVE-2026-5222
Ubuntu 14.04rustcFix pendingUBUNTU-CVE-2026-5222
Debian 14rust-cargoFixed0.91.0-3DEBIAN-CVE-2026-5222
Debian 14rustcFixed1.95.0+dfsg1-2DEBIAN-CVE-2026-5222
Debian 13rust-cargoFix pendingDEBIAN-CVE-2026-5222
Debian 13rustcFixed1.85.1+dfsg1-1+deb13u1DEBIAN-CVE-2026-5222
Debian 12cargoFix pendingDEBIAN-CVE-2026-5222
Debian 12rust-cargoFix pendingDEBIAN-CVE-2026-5222
Debian 12rustcFix pendingDEBIAN-CVE-2026-5222
Alpine Linux 3.24chromium-rustFixed1.96.0-r0ALPINE-CVE-2026-5222
Alpine Linux 3.24rustFixed1.96.0-r0ALPINE-CVE-2026-5222
Alpine Linux 3.23rustFixed1.91.1-r2ALPINE-CVE-2026-5222
crates.io librarycargoFixed0.97.0GHSA-p688-r7jv-fm6f

What the vendor says

As published in the CVE record by rust, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Solution: 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.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.