CVE-2026-5223

Crates in third party registries can override the cached source of other crates

Published May 25, 2026 CVSS 4.0 · 6.5 Medium EPSS < 1% KEV · Not listed
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.

Remediation

Vendor Solution

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.


Vendor Workaround

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

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-jq42-7mfv-hm57 Cargo crates in third party registries can override the cached source of other crates
History
Type Values Removed Values Added
CPEs cpe:2.3:a:rust-lang:cargo:*:*:*:*:*:rust:*:*
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Rust-lang
Rust-lang cargo
Vendors & Products Rust-lang
Rust-lang cargo
Type Values Removed Values Added
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.
Title Crates in third party registries can override the cached source of other crates
Weaknesses CWE-61
References
Metrics cvssV4_0

{'score': 6.5, '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'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
rust
Published
Updated
May 27, 2026, 6:35 PM
Reserved
Mar 31, 2026, 12:07 PM
Status
Analyzed
Published
May 25, 2026, 10:16 AM
Modified
Jul 23, 2026, 5:10 PM