CVE-2023-22742: libgit2
Vulnerability summary
CVE-2023-22742 is a medium (CVSS 5.9) vulnerability in libgit2. EPSS estimates a 0.58% chance of exploitation in the next 30 days, higher than 46.6% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 3 · Related 3Timeline
- 20-01-2023PublishedVulnerability first disclosed.
- 10-03-2025Last modifiedVulnerability information updated.
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 metrics
6 scores · 6 sources · 1 version- CVE.orgCNA5.3MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:NDiffers
- OSV · UbuntuEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
- OSV · DebianEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
- OSV · ChainguardEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:NDiffers
- OSV · Crates.ioEcosystem advisory · calculated6.8MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:NDiffers
EPSS trend
Probability
0.58%
Chance of exploitation in the next 30 days
Percentile
47%
Versus all other CVEs
30-day change
0.00 pp
From 0.58% on 20-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Suse4 products
- libgit2&distro=SUSE Linux Enterprise Module for Development Tools 15 SP4< 1.3.0-150400.3.6.1
- libgit2&distro=SUSE Linux Enterprise Real Time 15 SP3< 0.28.4-150200.3.6.1
- libgit2&distro=SUSE Manager Server Module 4.2< 0.28.4-150200.3.6.1
- libgit2&distro=SUSE Manager Server Module 4.3< 0.28.4-150200.3.6.1
Crates.Io2 products
- git2< 0.16.1
- libgit2-sys≥ 0.14.0, < 0.14.2 | < 0.13.5
Opensuse2 products
- libgit2&distro=openSUSE Leap 15.4< 0.26.8-150000.3.18.1 | < 1.3.0-150400.3.6.1 | < 0.28.4-150200.3.6.1
- libgit2&distro=openSUSE Tumbleweed< 1.5.1-1.1
Chainguard1 product
- libgit2-1.5< 1.7.2-r0
Debian1 product
- libgit2< 1.5.1+ds-1
Libgit21 product
- libgit2= 1.5.0 | < 1.4.5 | 1.5.0
Ubuntu1 product
- libgit2< 0.24.1-2ubuntu0.2+esm2 | < 0.26.0+dfsg.1-1.1ubuntu0.2+esm1 | < 0.28.4+dfsg.1-2ubuntu0.1 | < 1.1.0+dfsg.1-4.1ubuntu0.1
7 vendors · 12 products
References
23 links- github.com/libgit2/libgit2/security/advisories/GHSA-8643-3wh5-rmjqX Refsource CONFIRMREPORTAdvisoryWEBThird Party Advisory
- github.com/libgit2/libgit2/commit/42e5db98b963ae503229c63e44e06e439df50e56X Refsource MISCFIXPatchThird Party Advisory
- github.com/libgit2/libgit2/commit/cd6f679af401eda1f172402006ef8265f8bd58eaX Refsource MISCFIXPatchThird Party Advisory
- github.com/libgit2/libgit2/releases/tag/v1.4.5X Refsource MISCREPORTWEBRelease NotesThird Party Advisory
- github.com/libgit2/libgit2/releases/tag/v1.5.1X Refsource MISCREPORTWEBRelease NotesThird Party Advisory
Show all 23 references
- github.com/rust-lang/git2-rsPACKAGE
- crates.io/crates/libgit2-sysPACKAGE