CVE-2023-22742

Summary

CVECVE-2023-22742
StatePUBLIC
Assigner[email protected]
Source PriorityCVE Program / NVD first with legacy fallback
Published2023-01-20 23:15:00 UTC
Updated2023-11-07 04:07:00 UTC
Descriptionlibgit2 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.

Risk And Classification

Problem Types: CWE-347

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Libgit2 Libgit2 All All All All
Application Libgit2 Libgit2 1.5.0 All All All

References

ReferenceSourceLinkTags
Release libgit2 v1.5.1 · libgit2/libgit2 · GitHub MISC github.com
oss-security - Re: CVE-2022-46176: Cargo does not check SSH host keys www.openwall.com
libssh2 MISC www.libssh2.org
Merge pull request #6449 from libgit2/1.4_ssh · libgit2/libgit2@cd6f679 · GitHub MISC github.com
libgit2 fails to verify SSH keys by default · Advisory · libgit2/libgit2 · GitHub MISC github.com
Release libgit2 v1.4.5 · libgit2/libgit2 · GitHub MISC github.com
Merge pull request #6450 from libgit2/1.5_ssh · libgit2/libgit2@42e5db9 · GitHub MISC github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Legacy QID Mappings

  • 181608 Debian Security Update for libgit2 (DLA 3340-1)
  • 184202 Debian Security Update for libgit2 (CVE-2023-22742)
  • 200167 Ubuntu Security Notification for libgit2 Vulnerabilities (USN-6678-1)
  • 502877 Alpine Linux Security Update for libgit2
  • 753926 SUSE Enterprise Linux Security Update for libgit2 (SUSE-SU-2023:1909-1)
  • 905341 Common Base Linux Mariner (CBL-Mariner) Security Update for rust (13147)
  • 905352 Common Base Linux Mariner (CBL-Mariner) Security Update for libgit2 (13140)
  • 905368 Common Base Linux Mariner (CBL-Mariner) Security Update for rust (13175)
  • 906804 Common Base Linux Mariner (CBL-Mariner) Security Update for rust (13175-1)
© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

CVE.report and Source URL Uptime Status status.cve.report