Vulnerability DatabaseGHSA-m4ch-rfv5-x5g3

GHSA-m4ch-rfv5-x5g3
Rust vulnerability analysis and mitigation

Overview

The git2 and libgit2-sys crates, which are Rust wrappers around the libgit2 C library, were found to have a security vulnerability (CVE-2023-22742) where SSH host keys were not verified by default when establishing SSH connections. This vulnerability affects git2 versions below 0.16.1 and libgit2-sys versions below 0.13.5 and between 0.14.0 and 0.14.2, with the issue being discovered and disclosed on January 20, 2023 (GitHub Advisory, RustSec Advisory).

Technical details

The vulnerability stems from libgit2's default behavior where it requires the caller to set the certificatecheck field of the gitremote_callbacks structure. Without a configured certificate check callback, the library performs no certificate checking during SSH connections. The issue has a CVSS v3.1 base score of 6.8 (Moderate) with the vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N, indicating a network-based attack vector with high attack complexity and no privileges required (GitHub Advisory).

Impact

The vulnerability exposes users to potential Man-In-The-Middle (MITM) attacks when establishing SSH connections, as the library fails to validate server SSH keys by default. This could lead to unauthorized access to confidential information and potential integrity breaches during Git operations over SSH (LibGit2 Advisory).

Mitigation and workarounds

The vulnerability has been patched in git2 version 0.16.1 and libgit2-sys versions 0.14.2 and 0.13.5. The fixes update the underlying libgit2 C library to versions 1.5.1 and 1.4.5 respectively, which implement proper SSH host key verification by default. Users are strongly encouraged to upgrade to these patched versions. For those unable to upgrade immediately, it's crucial to ensure all relevant certificates are manually checked (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66627HIGH8.4
  • RustRust
  • wasmi
NoYesDec 09, 2025
GHSA-xrv8-2pf5-f3q7MEDIUM6
  • RustRust
  • nitro-tpm-pcr-compute
NoYesDec 05, 2025
CVE-2025-67487MEDIUM5.5
  • RustRust
  • static-web-server
NoYesDec 09, 2025
CVE-2025-66622LOW1.3
  • RustRust
  • matrix-sdk-base
NoYesDec 09, 2025
RUSTSEC-2025-0135N/AN/A
  • RustRust
  • matrix-sdk-base
NoYesDec 08, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management