Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAttacker obtains publish access to third-party Cargo registry
-
DeliveryCraft malicious crate tarball containing symlink targeting another crate's cache path
-
ExploitPublish malicious crate to registry
-
InstallVictim project adds dependency on malicious crate (directly or transitively)
-
C2Victim runs cargo build or cargo check
-
ExecuteCargo unpacks tarball and follows symlink, overwriting target crate source files
-
ImpactSubstituted source compiled and executed at build time with victim's privileges
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling UNIX symlink resolution
|
| Exploitation Conditions | Exploitation requires the victim's Cargo to be configured to use a third-party registry other than crates.io - this is the single hard prerequisite, and users exclusively relying on crates.io are explicitly not affected. The attacker must have the ability to publish a crate to that third-party registry (publisher account or compromised credential on that registry). On the victim side, no authentication is required (PR:N per CVSS 4.0) and no special build configuration is needed beyond having a dependency (direct or transitive) on the malicious crate. Passive user interaction is required (UI:P): the victim must execute a Cargo command that triggers download and unpacking, such as 'cargo build', 'cargo check', 'cargo fetch', or 'cargo update'. The symlink can only target crates from the same registry (overriding cross-registry sources is not implied by the description). Exploitation is limited to platforms where symlinks have filesystem effect - Windows behavior may differ but is not addressed in available data. |
| Impact | The CVSS 4.0 score of 6.5 (Medium) reflects an asymmetry between vulnerable-system and subsequent-system impact: the vulnerable system (the developer's Cargo process) has only low integrity impact (VI:L), but the subsequent system scores high across all pillars (SC:H/SI:H/SA:H), capturing the supply chain cascading effect - substituted source code, once compiled, can execute arbitrary logic with the developer's full privileges. The network attack vector (AV:N) with low complexity (AC:L) and no privileges required (PR:N) indicates ease of exploitation, tempered by passive user interaction (UI:P). EPSS of 0.04% at the 14th percentile is very low, and this CVE is not in CISA KEV, suggesting no observed active exploitation to date. The realistic risk is primarily to organizations using internal or alternative third-party Cargo registries where an insider or compromised publisher account could upload a malicious crate - an elevated concern for enterprise Rust shops relying on private registries. For the general Rust ecosystem via crates.io, this vulnerability poses zero risk by policy. The medium CVSS score likely underweights the build-time code execution potential for affected users. |
| Exploit ScenarioDerived | An attacker with publish access to a third-party Cargo registry crafts a crate tarball containing a symlink at a predictable path - for example, bar-0.0.1/.cargo-ok pointing to the source directory of a widely depended-upon crate in the same registry's local cache. When a developer runs 'cargo build' on a project that depends on this malicious crate, Cargo downloads and unpacks the tarball, follows the symlink, and overwrites the target crate's source files with attacker-controlled content. On the next compilation, the substituted source is compiled and executed in the context of the developer's build environment, granting arbitrary code execution. No public exploit code has been identified at time of analysis, though the PR diff includes test cases that demonstrate the attack path. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 08, 2026
Tarball unpacking in Rust's Cargo package manager fails to reject symlinks within downloaded crate archives, enabling a malicious crate hosted on a third-party registry to overwrite source files belonging to other crates in the victim's local registry cache. The attack requires no privileges on the attacker side (PR:N per CVSS 4.0) but passive user interaction (UI:P) - specifically, a developer running any Cargo command that triggers crate download and extraction. While crates.io users are explicitly unaffected (that registry enforces a server-side symlink prohibition), users of any third-party Cargo registry are at risk of supply chain source substitution; no public exploit has been identified at time of analysis, and EPSS is very low at 0.04%.
RemediationAI
The upstream fix is available in GitHub PR #17031 (https://github.com/rust-lang/cargo/pull/17031); however, the specific patched Cargo release version is not independently confirmed from available data - check the official advisory at https://blog.rust-lang.org/2026/05/25/cve-2026-5223/ for the exact fixed release. Once confirmed, upgrade via 'rustup update stable' to obtain the patched Cargo bundled with the new stable Rust release. As a compensating control while awaiting the patch, organizations should audit and restrict Cargo's configured registry sources to trusted, access-controlled registries only - operators of third-party registries should enforce a symlink-rejection policy analogous to crates.io's. As a more aggressive control, removing third-party registry entries from ~/.cargo/config.toml or Cargo.toml eliminates the attack surface entirely but will break any builds depending on those registries. Auditing the local Cargo registry cache (typically ~/.cargo/registry/src/) for unexpected symlinks can help detect prior exploitation.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in cargo
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-61 (UNIX Symbolic Link Following). Cargo's tarball unpacker in src/cargo/sources/registry/mod.rs used the Rust 'tar' crate's Archive type without validating the EntryType of each archive member. This allowed symlinks present in a crate tarball to be written directly to the filesystem during unpacking. Because Cargo stores registry sources in a shared local cache directory (under ~/.cargo/registry/src/), a symlink in one crate's tarball could point to source files belonging to another crate from the same registry, effectively overwriting them. The fix imports EntryType from the tar crate and enforces an allowlist permitting only Regular and Directory entry types, bailing out with an error for any other type (including Symlink). Secondary changes in the PR also fix URL canonicalization for sparse registry identifiers to prevent cache path collisions. The affected product is identified by CPE cpe:2.3:a:rust_project:cargo:*:*:*:*:*:*:*:*, with no version bound on the lower end indicated by available data.
Know when Cargo gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
Primary rating from Vendor (rust).
CVSS VectorVendor: rust
Lifecycle Timeline
2DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') vulnerability in The Wikimedia Foun
Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in The Wikimed
Cross-Site Request Forgery (CSRF) vulnerability in The Wikimedia Foundation Mediawiki - Cargo allows Cross Site Request
Cargo is a package manager for the rust programming language. Rated high severity (CVSS 8.1), this vulnerability is remo
Cargo downloads the Rust project’s dependencies and compiles the project. Rated high severity (CVSS 7.3), this vulnerabi
Cargo is a package manager for the rust programming language. Rated medium severity (CVSS 6.5), this vulnerability is re
Credential leakage in Cargo's sparse index registry URL normalization affects all Cargo releases from 1.68 through 1.96.
Same weakness CWE-61 – UNIX Symbolic Link (Symlink) Following
View allSame technique Information Disclosure
View allVendor StatusVendor
SUSE
Severity: Medium| Product | Status |
|---|---|
| SUSE Linux Enterprise Desktop 15 SP7 | Fixed |
| SUSE Linux Enterprise Desktop 15 SP7 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP7 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP7 | Fixed |
| SUSE Linux Enterprise Module for Development Tools 15 SP7 | Fixed |
| SUSE Linux Enterprise Module for Development Tools 15 SP7 | Fixed |
| SUSE Linux Enterprise Server 15 SP7 | Fixed |
| SUSE Linux Enterprise Server 15 SP7 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Fixed |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Fixed |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Fixed |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Fixed |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Fixed |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Fixed |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Fixed |
| openSUSE Leap 15.6 | Fixed |
EUVD-2026-31658
GHSA-jq42-7mfv-hm57
NVD
CVE.org
EPSS
Exploit-DB