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

Medium 6.5 Published Updated

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.

PackageAffectedFixed in
cargo crates.ioAll versions0.97.0
cargo crates.ioAll versions0.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.

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.

Is CVE-2026-5223 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free