{"id":"CVE-2026-5223","published":"2026-05-25T08:57:08Z","modified":"2026-05-27T18:35:35Z","title":"Crates in third party registries can override the cached source of other crates","vendor":"Rust Project","product":"Cargo","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:H/SI:H/SA:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00415,"percentile":0.27484,"provenance":"source"},"cwes":[{"id":"CWE-61","name":"UNIX Symbolic Link (Symlink) Following"}],"references":[{"url":"https://groups.google.com/g/rustlang-security-announcements/c/IB74S7Yksg8","tags":["vendor-advisory","mailing-list"]},{"url":"https://blog.rust-lang.org/2026/05/25/cve-2026-5223/","tags":["vendor-advisory"]},{"url":"https://github.com/rust-lang/cargo/pull/17031","tags":["patch"]}],"priority":{"score":10.0,"factors":[{"name":"EPSS percentile","points":5.5},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"rust-project","affectedVersions":[{"vendor":"Rust Project","product":"Cargo","versions":[">= 1.0.0, < 1.96.0"]}],"solutions":{"items":["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."],"from":"CVE.org CNA","provenance":"source"},"workarounds":{"items":["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)."],"from":"CVE.org CNA","provenance":"source"},"capec":[{"id":"CAPEC-141","name":"Cache Poisoning"}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-05-26T14:36:37.949868Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"crates.io","package":"cargo","vulnerableRanges":["<0.97.0"],"patched":["0.97.0"],"from":["GHSA-jq42-7mfv-hm57"],"provenance":"source"}],"summary":{"text":"Cargo, the Rust package manager, mishandles symlinks inside crate tarballs downloaded from third-party registries, so a malicious crate can override the cached source code of another crate from the same registry. An attacker needs to publish a malicious crate to a third-party registry and get a user to interact with it, such as by downloading or building it, with no prior authentication or network access required; crates.io is not affected because it forbids symlinks in uploaded crates.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:08:05Z"},"euvd":{"id":"EUVD-2026-31658","exploited":false,"provenance":"source"}}