CVE-2022-46176
Cargo did not verify SSH host keys
- Published
- Updated
- Reserved
- Assigned by
- GitHub_M
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.
Timeline
ID reserved
By GitHub_M
- 44 days later
· 44 days later
Published
- 2 years later
· 2 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium5.3 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N |
| NVDNVD · Modified | 3.1 | Medium5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N |
- EPSS (exploitation in 30 days)
- 0.68% · top 47% of all CVEs (7 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 5.3.
Weakness
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- crates.iocargoGHSA-r5w3-xm58-jv6j (opens in a new tab)
References (4)
- https://github.com/rust-lang/cargo/security/advisories/GHSA-r5w3-xm58-jv6j (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/rust-lang/wg-security-response/tree/main/patches/CVE-2022-46176 (opens in a new tab)x_refsource_MISCx_transferred
- http://www.openwall.com/lists/oss-security/2023/11/05/6 (opens in a new tab)x_transferred
- http://www.openwall.com/lists/oss-security/2023/11/06/5 (opens in a new tab)x_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-r5w3-xm58-jv6j (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2022-46176)Record last updated .