Improper Input Validation Affecting libgit2/libgit2 package, versions [,1.4.5)[1.5.0,1.5.1)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.58% (43rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UNMANAGED-LIBGIT2LIBGIT2-3244371
  • published22 Jan 2023
  • disclosed22 Jan 2023
  • creditUnknown

Introduced: 22 Jan 2023

CVE-2023-22742  (opens in a new tab)
CWE-347  (opens in a new tab)

How to fix?

Upgrade libgit2/libgit2 to version 1.4.5, 1.5.1 or higher.

Overview

Affected versions of this package are vulnerable to Improper Input Validation. When using an SSH remote with the optional libssh2 backend, libgit2 does not perform certificate checking by default. Prior versions of libgit2 require the caller to set the certificate_check field of libgit2's git_remote_callbacks structure - if a certificate check callback is not set, libgit2 does not perform any certificate checking. This means that by default - without configuring a certificate check callback, clients will not perform validation on the server SSH keys and may be subject to a man-in-the-middle attack. Users unable to upgrade should ensure that all relevant certificates are manually checked.

CVSS Base Scores

version 3.1