CVE-2023-22742
Fixed in a distro release EPSS <1%CVSS 5.3
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.
Products: libgit2
Fixed upstream
| Ecosystem | Package | Fixed in |
|---|---|---|
| crates.io | git2 | 0.16.1 |
| crates.io | libgit2-sys | 0.14.2 |
| crates.io | libgit2-sys | 0.13.5 |
Distro releases
| Release | Package | Fixed in |
|---|---|---|
| Chainguard | libgit2-1.5 | 1.7.2-r0 |
| Debian 10 | libgit2 | 0.27.7+dfsg.1-0.2+deb10u1 |
| Debian 12 | libgit2 | 1.5.1+ds-1 |
| Debian 13 | libgit2 | 1.5.1+ds-1 |
| Debian 14 | libgit2 | 1.5.1+ds-1 |
| SUSE Linux Enterprise Module for Development Tools 15 SP4 | libgit2 | 1.3.0-150400.3.6.1 |
| SUSE Linux Enterprise Real Time 15 SP3 | libgit2 | 0.28.4-150200.3.6.1 |
| SUSE Manager Server Module 4.2 | libgit2 | 0.28.4-150200.3.6.1 |
| SUSE Manager Server Module 4.3 | libgit2 | 0.28.4-150200.3.6.1 |
| Ubuntu 20.04 LTS | libgit2 | 0.28.4+dfsg.1-2ubuntu0.1 |
| Ubuntu 22.04 LTS | libgit2 | 1.1.0+dfsg.1-4.1ubuntu0.1 |
| Ubuntu Pro 16.04 LTS | libgit2 | 0.24.1-2ubuntu0.2+esm2 |
| Ubuntu Pro 18.04 LTS | libgit2 | 0.26.0+dfsg.1-1.1ubuntu0.2+esm1 |
| openSUSE Leap 15.4 | libgit2 | 1.3.0-150400.3.6.1 |
| openSUSE Leap 15.4 | libgit2 | 0.26.8-150000.3.18.1 |
| openSUSE Leap 15.4 | libgit2 | 0.28.4-150200.3.6.1 |
| openSUSE Tumbleweed | libgit2 | 1.5.1-1.1 |