CVE-2022-46176: rust-lang cargo
Vulnerability summary
CVE-2022-46176 is a medium (CVSS 5.9) vulnerability in rust-lang cargo. EPSS estimates a 0.65% chance of exploitation in the next 30 days, higher than 50.1% of scored vulnerabilities.
Timeline
- 11-01-2023PublishedVulnerability first disclosed.
- 10-03-2025Last modifiedVulnerability information updated.
Description
Cargo is a Rust package manager. The Rust Security Response WG was notified that Cargo did not perform SSH host key verification when cloning indexes and dependencies via SSH. An attacker could exploit this to perform man-in-the-middle (MITM) attacks. This vulnerability has been assigned CVE-2022-46176. All Rust versions containing Cargo before 1.66.1 are vulnerable. Note that even if you don't explicitly use SSH for alternate registry indexes or crate dependencies, you might be affected by this vulnerability if you have configured git to replace HTTPS connections to GitHub with SSH (through git's [`url.<base>.insteadOf`][1] setting), as that'd cause you to clone the crates.io index through SSH. Rust 1.66.1 will ensure Cargo checks the SSH host key and abort the connection if the server's public key is not already trusted. We recommend everyone to upgrade as soon as possible.
CVSS metrics
6 scores · 6 sources · 1 version- CVE.orgCNA5.3MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:NDiffers
- OSV · AlpineEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
- OSV · UbuntuEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
- OSV · DebianEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
- OSV · Crates.ioEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:NDiffers
EPSS trend
Probability
0.65%
Chance of exploitation in the next 30 days
Percentile
50%
Versus all other CVEs
30-day change
0.00 pp
From 0.65% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Suse8 products
- rust1.65&distro=SUSE Enterprise Storage 7.1< 1.65.0-150300.7.9.1
- rust1.65&distro=SUSE Linux Enterprise High Performance Computing 15 SP3-ESPOS< 1.65.0-150300.7.9.1
- rust1.65&distro=SUSE Linux Enterprise High Performance Computing 15 SP3-LTSS< 1.65.0-150300.7.9.1
- rust1.65&distro=SUSE Linux Enterprise Module for Development Tools 15 SP4< 1.65.0-150300.7.9.1
- rust1.65&distro=SUSE Linux Enterprise Real Time 15 SP3< 1.65.0-150300.7.9.1
Opensuse4 products
- rust1.65&distro=openSUSE Leap 15.4< 1.65.0-150300.7.9.1
- rust1.65&distro=openSUSE Tumbleweed< 1.65.0-4.1
- rust1.66&distro=openSUSE Leap 15.4< 1.66.0-150400.9.9.1
- rust1.66&distro=openSUSE Tumbleweed< 1.66.0-2.1
Debian2 products
- cargo< 0.66.0+ds1-1
- rust-cargo< 0.66.0-1
Ubuntu2 products
- cargoAll versions (No fix recorded) | < 0.67.1+ds0ubuntu0.libgit2-0ubuntu0.20.04.2 | < 0.67.1+ds0ubuntu0.libgit2-0ubuntu0.22.04.2
- rust-cargoAll versions (No fix recorded)
Alpine1 product
- rust< 1.66.1-r0
Crates.Io1 product
- cargo< 0.67.1
Rust-lang1 product
- cargo≤ 0.67.0
7 vendors · 19 products
References
17 links- github.com/rust-lang/cargo/security/advisories/GHSA-r5w3-xm58-jv6jX Refsource CONFIRMWEBMitigationThird Party Advisory
- github.com/rust-lang/wg-security-response/tree/main/patches/CVE-2022-46176X Refsource MISCREPORTWEBPatchThird Party Advisory
Show all 17 references
- github.com/rust-lang/cargoPACKAGE