Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. cargo
  4. ›
  5. CVE-2026-5223

CVE-2026-5223: Cargo crates in third party registries can override the cached source of other crates

June 26, 2026

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.

References

  • blog.rust-lang.org/2026/05/25/cve-2026-5223
  • github.com/advisories/GHSA-jq42-7mfv-hm57
  • github.com/rust-lang/cargo/pull/17031
  • github.com/rust-lang/cargo/security/advisories/GHSA-jq42-7mfv-hm57
  • groups.google.com/g/rustlang-security-announcements/c/IB74S7Yksg8
  • nvd.nist.gov/vuln/detail/CVE-2026-5223

Code Behaviors & Features

Detect and mitigate CVE-2026-5223 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.97.0

Fixed versions

  • 0.97.0

Solution

Upgrade to version 0.97.0 or above.

Impact 9.6 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-61: UNIX Symbolic Link (Symlink) Following

Source file

cargo/cargo/CVE-2026-5223.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Thu, 16 Jul 2026 00:19:00 +0000.