# CVE-2022-46176: Cargo did not verify SSH host keys

- Severity: Medium 5.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.70%, higher than 54% of CVEs (2026-12-01)
- Published: 2023-01-10T21:09:31.000Z
- Modified: 2026-06-17T05:11:22.090Z
- Also known as: GHSA-r5w3-xm58-jv6j
- Weaknesses: CWE-347
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- rust-lang cargo: <= 0.67.0; up to 0.67.0
- cargo (crates.io): before 0.67.1

## Every score

- GitHub_M: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N`
- NVD: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N`

## References

- <https://github.com/rust-lang/cargo/security/advisories/GHSA-r5w3-xm58-jv6j> (mitigation, third-party-advisory, web)
- <https://github.com/rust-lang/wg-security-response/tree/main/patches/CVE-2022-46176> (patch, third-party-advisory, web)
- <http://www.openwall.com/lists/oss-security/2023/11/05/6> (web)
- <http://www.openwall.com/lists/oss-security/2023/11/06/5>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-46176> (advisory)
- <https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtinsteadOf> (web)
- <https://github.com/rust-lang/cargo> (package)
- <https://www.rust-lang.org/policies/security> (web)

## Sources

- CVE List: [CVE-2022-46176](https://www.cve.org/CVERecord?id=CVE-2022-46176), CVE Terms of Use, modified 2025-03-10
- GitHub Advisory Database: [GHSA-r5w3-xm58-jv6j](https://github.com/advisories/GHSA-r5w3-xm58-jv6j), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2022-46176](https://nvd.nist.gov/vuln/detail/CVE-2022-46176), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-46176 · Whole record: https://cve.day/CVE-2022-46176.json · Rebuilt by cve.day 2026-11-25T22:58:18.165Z
