CVE-2026-5223 Crates in third party registries can override the cached source of other crates
A malicious crate in a third-party registry can override another crate's source code via symlink handling, enabling supply chain attacks.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-5223?
CVE-2026-5223 is a medium-severity path traversal vulnerability in Rust Project Cargo, published on 25 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
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. 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.
Weakness: CWE-61
Which versions are affected by CVE-2026-5223?
2 open source packages ship an affected version, including cargo. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
cargo crates.io | All versions | 0.97.0 |
cargo crates.io | All versions | 0.97.0 |
Products include Rust-Lang Cargo.
How do I fix CVE-2026-5223?
Upgrade cargo to 0.97.0 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-5223 being exploited?
There is no known exploitation of CVE-2026-5223 in the wild and no public exploit code.
Other vulnerabilities in Rust Project Cargo
Sources
Also known as ALPINE-CVE-2026-5223, AZL-88272, AZL-88278, BELL-CVE-2026-5223, DEBIAN-CVE-2026-5223, GHSA-jq42-7mfv-hm57 and 2 more.