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.
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).
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.