CVE-2022-46176 | Cargo did not verify SSH host keys

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.

Published: 2023-01-11 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2022-46176 is rated Low Risk (33.4/100): CVSS Medium severity, with low exploitation likelihood (EPSS 0.15%). Mandatory action: Monitor for updates and reassess as exploit intelligence or EPSS changes.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2022-46176

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-05-25 0.15% 0.15% -0.00%
2 2026-05-22 0.15% 0.15% +0.00%
3 2026-03-23 0.15%

Full EPSS history (14 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2022-46176

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
5.3 3.1 MEDIUM
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
1.6 3.6 [email protected]
5.9 3.1 MEDIUM
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
2.2 3.6 [email protected]

Weakness enumeration for CVE-2022-46176

GitHub Security Advisory for CVE-2022-46176

GHSA-r5w3-xm58-jv6j · Severity: medium · Ecosystem: rust — Cargo did not verify SSH host keys

OS Trackers for CVE-2022-46176

vendor priority summary link
alpine medium CVE-2022-46176: 1 source package rows (rust); 7 state rows across 7 repos (3.18-community, 3.19-main, 3.20-main, 3.21-main, 3.22-main, edge-community, edge-main); fixed 7, open 0. https://security.alpinelinux.org/vuln/CVE-2022-46176
debian not yet assigned CVE-2022-46176 not yet assigned priority: Debian including 2 source packages (cargo, rust-cargo), 7 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5, open 2. https://security-tracker.debian.org/tracker/CVE-2022-46176
gentoo normal CVE-2022-46176: 1 GLSA(s) (202409-07), 2 atom(s) (dev-lang/rust, dev-lang/rust-bin); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2022-46176
redhat medium https://access.redhat.com/security/cve/CVE-2022-46176
suse high CVE-2022-46176 severity important: SUSE including 66 source package names (1.65-13.5:cargo1.65-1.65.0-150300.7.9.1, 1.65-13.5:rust1.65-1.65.0-150300.7.9.1, …), 475 product×package rows across 36 product lines (Container bci/rust, SUSE CaaS Platform 4.0, … (36 product lines)): Will Not Fix 406, Fixed 44, Known Not Affected 25. https://www.suse.com/security/cve/CVE-2022-46176/
ubuntu medium CVE-2022-46176 medium priority: Ubuntu including 2 source packages (cargo, rust-cargo), 26 status rows across 13 suites (bionic, focal, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): DNE 7, not-affected 6, ignored 4, released 4, needed 3, needs-triage 2. https://ubuntu.com/security/CVE-2022-46176

Affected software / configurations for CVE-2022-46176

Vendor Product Version Raw CPE
rust-lang cargo <= 0.67.0 cpe:2.3:a:rust-lang:cargo:*:*:*:*:*:rust:*:*

References for CVE-2022-46176

cvelogic Threat Intelligence