GHSA-M4CH-RFV5-X5G3

GHSA-M4CH-RFV5-X5G3 is a medium-severity security vulnerability in libgit2-sys (rust), affecting versions >= 0.14.0, < 0.14.2. It is fixed in 0.14.2, 0.13.5, 0.16.1.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

git2-rs fails to verify SSH keys by default

The git2 and libgit2-sys crates are Rust wrappers around the libgit2 C library. It was discovered that libgit2 1.5.0 and below did not verify SSH host keys when establishing an SSH connection, exposing users of the library to Man-In-the-Middle attacks.

The libgit2 team assigned CVE-2023-22742 to this vulnerability. The following versions of the libgit2-sys Rust crate have been released:

  • libgit2-sys 0.14.2, updating the underlying libgit2 C library to version 1.5.1.
  • libgit2-sys 0.13.5, updating the underlying libgit2 C library to version 1.4.5.

A new git2 crate version has also been released, 0.16.1. This version only bumps its libgit2-sys dependency to ensure no vulnerable libgit2-sys versions are used, but contains no code changes: if you update the libgit2-sys version there is no need to also update the git2 crate version.

You can learn more about this vulnerability in libgit2's advisory

Impact

GHSA-M4CH-RFV5-X5G3 has a CVSS score of 6.8 (Medium). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.14.2, 0.13.5, 0.16.1); upgrading removes the vulnerable code path.

Affected versions

libgit2-sys (>= 0.14.0, < 0.14.2) libgit2-sys (< 0.13.5) git2 (< 0.16.1)

Security releases

libgit2-sys → 0.14.2 (rust) libgit2-sys → 0.13.5 (rust) git2 → 0.16.1 (rust)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade the following packages to resolve this vulnerability:

libgit2-sys to 0.14.2 or later; libgit2-sys to 0.13.5 or later; git2 to 0.16.1 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is GHSA-M4CH-RFV5-X5G3? GHSA-M4CH-RFV5-X5G3 is a medium-severity security vulnerability in libgit2-sys (rust), affecting versions >= 0.14.0, < 0.14.2. It is fixed in 0.14.2, 0.13.5, 0.16.1.
  2. How severe is GHSA-M4CH-RFV5-X5G3? GHSA-M4CH-RFV5-X5G3 has a CVSS score of 6.8 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by GHSA-M4CH-RFV5-X5G3?
    • libgit2-sys (rust) (versions >= 0.14.0, < 0.14.2)
    • git2 (rust) (versions < 0.16.1)
  4. Is there a fix for GHSA-M4CH-RFV5-X5G3? Yes. GHSA-M4CH-RFV5-X5G3 is fixed in 0.14.2, 0.13.5, 0.16.1. Upgrade to this version or later.
  5. Is GHSA-M4CH-RFV5-X5G3 exploitable, and should I be worried? Whether GHSA-M4CH-RFV5-X5G3 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether GHSA-M4CH-RFV5-X5G3 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix GHSA-M4CH-RFV5-X5G3?
    • Upgrade libgit2-sys to 0.14.2 or later
    • Upgrade libgit2-sys to 0.13.5 or later
    • Upgrade git2 to 0.16.1 or later

Other vulnerabilities in libgit2-sys

Stop the waste.
Protect your environment with Kodem.