Catégories
CVE-2026-5222 medium CVSS 6.5

Vulnérabilité dans cargo (CVE-2026-5222)

Résumé

Vulnérabilité dans cargo (CVE-2026-5222). Des informations confidentielles peuvent être exposées. Exploitable via foo. Atténuation : mise à jour vers 0.97.0 ou plus.

Description d'origine

La description telle que publiée par la source (souvent en anglais).

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.…

Source: NIST National Vulnerability Database NVD GitHub Advisory

Résumé généré automatiquement

Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.

Une vulnérabilité référencée CVE-2026-5222 a été découverte dans cargo.
Des attaquants peuvent cibler un point d'entrée spécifique comme foo à distance pour détourner le produit.
Des informations confidentielles peuvent être exposées. Score CVSS : 6.5/10.
Action : mettez à jour cargo vers 0.97.0 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « cargo CVE-2026-5222 » sur le site de l'éditeur.

CVE-2026-5222 (cargo) — CWE-647 / CVSS v3 6.5
Vecteur d'attaque : distant (réseau) / sans interaction utilisateur
Surface d'attaque : foo / bar
Correctif : 0.97.0 — appliquer immédiatement
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.

❓ Quel est le problème

Une vulnérabilité (CWE-647) affecte cargo. Les attaquants atteignent le code vulnérable via foo.

📍 Périmètre concerné

Consultez l'avis de l'éditeur pour les versions affectées de cargo. Surface d'attaque : foo / bar.

🔥 Gravité

Gravité : Moyenne (CVSS 6.5/10). Des informations confidentielles peuvent être exposées.

🔧 Comment corriger

Mettre à jour vers 0.97.0.

🛡️ Contournement

En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.

🔍 Détection

Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.

Actions de réponse

Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre

  1. 1
    Identify exposure identify
    grep -r 'cargo' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で cargo を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade cargo to 0.97.0

    ステージング環境で 0.97.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Paquets affectés

rust cargo
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.97.0"}]}]
crates.io cargo
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.97.0"}]}]

État des correctifs par distribution

Paquets corrigés publiés par chaque distribution pour cette CVE

Références

Nous utilisons des cookies pour l'analyse d'audience et la mesure publicitaire. Ce réglage s'applique à tous les sites de Game co., Ltd. En savoir plus