PT-2023-1358 · Cargo+5 · Cargo+5

Published

2023-01-10

·

Updated

2026-05-04

·

CVE-2022-46176

CVSS v3.1

5.9

Medium

VectorAV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
Name of the Vulnerable Software and Affected Versions Rust versions prior to 1.66.1
Description The issue is related to the Cargo package manager in Rust, which does not perform SSH host key verification when cloning indexes and dependencies via SSH. This allows an attacker to perform man-in-the-middle (MITM) attacks. If git is configured to replace HTTPS connections to GitHub with SSH, users might be affected even if they do not explicitly use SSH for alternate registry indexes or crate dependencies. The vulnerability can be exploited by an attacker to intercept traffic, potentially allowing them to redirect requests to a fake server.
Recommendations For Rust versions prior to 1.66.1, upgrade to Rust 1.66.1 as soon as possible to ensure Cargo checks the SSH host key and aborts the connection if the server's public key is not already trusted. As a temporary workaround, consider configuring git to not replace HTTPS connections to GitHub with SSH, or restrict the use of SSH for cloning indexes and dependencies until the issue is resolved.

Exploit

Fix

Improper Verification of Cryptographic Signature

Weakness Enumeration

Related Identifiers

ALT-PU-2023-1085
AZL-12969
BDU:2023-00687
CVE-2022-46176
GHSA-R5W3-XM58-JV6J
OESA-2025-1236
OESA-2025-1237
OPENSUSE-SU-2023_0132-1
OPENSUSE-SU-2023_0133-1
OPENSUSE-SU-2024:12607-1
OPENSUSE-SU-2024:12608-1
RUSTSEC-2023-0002
SUSE-SU-2023:0132-1
SUSE-SU-2023:0133-1
SUSE-SU-2023_0132-1
SUSE-SU-2023_0133-1

Affected Products

Alt Linux
Cargo
Debian
Red Os
Rust
Suse