Vulnérabilité dans cargo (CVE-2026-5223)
Résumé
Vulnérabilité dans cargo (CVE-2026-5223). Risque d'opérations non autorisées ou de divulgation. 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 handled symlinks inside of crate tarballs downloaded from third-party registries, allowing a malicious crate to override the source code of another crate from the same registry.
This vulnerability is tracked as CVE-2026-5223. The severity of the vulnerability is medium for users of third-party registries. Users of crates.io are not affected, as crates.io forbids uploading crates containing any symlink.
Overview
When building a crate, Cargo extracts its source code in a local cache (stored within ~/.cargo), reusing it for any future build. Cargo includes protections to prevent any file from being extracted outside of the crate's own cache directory.
It was discovered that it's possible to craft a malicious tarball able to extract files one level below the crate's own cache directory. With the way the cache is structured, that allowed the malicious crate to override the cache of other crates belonging to the same registry.
Mitigations
Rust 1.96.0, to be released on May 28th, 2026, will update Cargo to reject extracting any symlink within crate tarballs, regardless of whether they come from crates.io (which already forbids them) or third-party registries. Note that Cargo never added symlinks when running cargo package or cargo publish, so the impact of this should be minimal.
Users who are not able to upgrade to the most recent Rust version are recommended to audit the contents of th…
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-5223 a été découverte dans cargo.
Risque d'opérations non autorisées ou de divulgation. Score CVSS : 5.3/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-5223 » sur le site de l'éditeur.
CVE-2026-5223 (cargo) — CWE-61 / CVSS v3 5.3
Vecteur d'attaque : distant (réseau) / non authentifié / sans interaction utilisateur
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.
Une vulnérabilité (CWE-61) affecte cargo.
Consultez l'avis de l'éditeur pour les versions affectées de cargo.
Gravité : Moyenne (CVSS 5.3/10). Risque d'opérations non autorisées ou de divulgation.
Mettre à jour vers 0.97.0.
En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.
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
-
1Identify exposure identify
grep -r 'cargo' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
cargoを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade cargo to 0.97.0ステージング環境で 0.97.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
État des correctifs par distribution
Paquets corrigés publiés par chaque distribution pour cette CVE
- Alpine Linux ALPINE-CVE-2026-5223 rust Corrigé dans: 1.91.1-r2
- BellSoft Alpaquita BELL-CVE-2026-5223 rust Corrigé dans: 1.64.0-r4
- Debian DEBIAN-CVE-2026-5223 cargo
- Ubuntu UBUNTU-CVE-2026-5223 rustc
Références
- advisory nvd.nist.gov
- package github.com
- patch blog.rust-lang.org
- web github.com
- web groups.google.com
- web github.com
- web blog.rust-lang.org
- web github.com