CVE-2026-5223Medium▾ SunlitCargo crates in third party registries can override the cached source of other crates
▾ Sunlit zone — Low / medium · no exploitation signal
impact 27.5 · likelihood 0.1 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Jul 4.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via GHSA
0.3%
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.
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.
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 their registry for the presence of any symlink, and to configure their registry to reject symlink (if such option is available).
All versions of Cargo shipped before Rust 1.96.0 are affected.
Cargo would like to thank Christos Papakonstantinou for reporting this to us according to the Rust security policy.
Cargo also wants to thank the members of the Rust project who helped address the vulnerability: Josh Triplett for developing the fix; Arlo Siemsen for reviewing the fix; Emily Albini for writing this advisory; Emily Albini, Josh Stone and Manish Goregaokar for coordinating the disclosure; Ed Page and Eric Huss for advising during the disclosure.
cargo < 0.97.0Upgrade to a patched release:
cargo 0.97.0Connected by shared product, vendor, weakness, or advisory.
CVE-2026-5222LowCargo can be coerced to share credentials between registries
CVE-2026-39840Medium· 6.1Improper neutralization of input during web page generation ('cross-site scripting') vulnerability in Wikimedia Foundation Mediawiki - Cargo Extension allows XSS Targeting Non-Script Elements.This issue affects Mediawiki - Cargo Extensio…
GHSA-6xx4-9wp6-65p7Medium· 6.5skilo add follows symbolic links, allowing arbitrary local file disclosure from a malicious skill source
CVE-2026-63125Critical· 9.9Incus is a system container and virtual machine manager
CVE-2026-64846Low· 2.8Nix is a package manager for Linux and other Unix systems
CVE-2026-47766Nonecrun is an open source OCI Container Runtime fully written in C