CVE-2022-46176
What it is
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.
At a glance
- Exploitability
- Can be exploited over the network without logging in, but needs a user to act. High risk of data tampering.
- Exploit odds
- 0.7% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 0.7% in the next 30 days (EPSS).
- Severity: 5.3 MEDIUM (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 0.7% · EPSS, next 30 days
- Weakness
- CWE-347
- Record status
- Modified
Affected
- rust-lang Cargo ≤ 0.67.0
Attack profile CVSS 3.1 · 5.3
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- High
- Availability
- None
Raw vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2022-46176.md and follow it. Check whether this project is affected by CVE-2022-46176. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/rust-lang/cargo/security/advisories/GHSA-r5w3-xm58-jv6j
- https://github.com/rust-lang/wg-security-response/tree/main/patches/CVE-2022-46176
- https://github.com/rust-lang/cargo/security/advisories/GHSA-r5w3-xm58-jv6j
- https://github.com/rust-lang/wg-security-response/tree/main/patches/CVE-2022-46176
References
- http://www.openwall.com/lists/oss-security/2023/11/05/6
- http://www.openwall.com/lists/oss-security/2023/11/06/5
- https://github.com/rust-lang/cargo/security/advisories/GHSA-r5w3-xm58-jv6j
- https://github.com/rust-lang/wg-security-response/tree/main/patches/CVE-2022-46176
- http://www.openwall.com/lists/oss-security/2023/11/05/6
- http://www.openwall.com/lists/oss-security/2023/11/06/5
- https://github.com/rust-lang/cargo/security/advisories/GHSA-r5w3-xm58-jv6j
- https://github.com/rust-lang/wg-security-response/tree/main/patches/CVE-2022-46176