Medium severity · published Jan 20, 2023
CVE-2023-22742
libgit2 is a cross-platform, linkable library implementation of Git
5.9
CVSS
0.6%
EPSS
No
On KEV
Description
libgit2 is a cross-platform, linkable library implementation of Git. 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 are encouraged to upgrade to v1.4.5 or v1.5.1. Users unable to upgrade should ensure that all relevant certificates are manually checked.
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
Attack vector
Network
Complexity
High
Privileges
None
User interaction
None
Confidentiality
None
Integrity
High
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.6% · higher than 48% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
LI
Libgit2 · Libgit2
before 1.4.5; 1.5.0 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2023-22742
CVE.org
https://www.cve.org/CVERecord?id=CVE-2023-22742
www.openwall.com
http://www.openwall.com/lists/oss-security/2023/11/06/5
Patch
https://github.com/libgit2/libgit2/commit/42e5db98b963ae503229c63e44e06e439df50e56
Patch
https://github.com/libgit2/libgit2/commit/cd6f679af401eda1f172402006ef8265f8bd58ea
Release Notes
https://github.com/libgit2/libgit2/releases/tag/v1.4.5
Release Notes
https://github.com/libgit2/libgit2/releases/tag/v1.5.1
Third Party Advisory
https://github.com/libgit2/libgit2/security/advisories/GHSA-8643-3wh5-rmjq
More from Libgit2
9.8
CVE-2024-24577
libgit2 is a portable C implementation of the Git core methods provided as a linkable library with a solid API, allowing to build Git functionality into your application
9.8
CVE-2020-12279
An issue was discovered in libgit2 before 0.28.4 and 0.9x before 0.99.0
9.8
CVE-2020-12278
An issue was discovered in libgit2 before 0.28.4 and 0.9x before 0.99.0
9.8
CVE-2014-9390
Git before 1.8.5.6, 1.9.x before 1.9.5, 2.0.x before 2.0.5, 2.1.x before 2.1.4, and 2.2.x before 2.2.1 on Windows and OS X; Mercurial before 3.2.3 on Windows and OS X; Apple Xcode…
8.8
CVE-2026-5917
libgit2 Shell Command Injection via ssh_libssh2 Backend
