# CVE-2023-22742: libgit2: libgit2 is a cross-platform, linkable library implementation of Git

CVE-2023-22742 is fixed in 5 products on 1 platform, first by DEBIAN-CVE-2023-22742, released January 20, 2023. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2023-22742
- Priority: Routine
- CVSS: 5.9 (medium)
- EPSS: 0.0061
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Jan 20, 2023

## 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | libgit2 Debian 12.15 (bookworm) | 1.5.1+ds-1 | [DEBIAN-CVE-2023-22742](https://patchblox.com/security/data/fix/linux/debian-cve-2023-22742.md) | Jan 20, 2023 |
| Linux | libgit2 Debian 13.5 (trixie) | 1.5.1+ds-1 | [DEBIAN-CVE-2023-22742](https://patchblox.com/security/data/fix/linux/debian-cve-2023-22742.md) | Jan 20, 2023 |
| Linux | libgit2 Debian 14 | 1.5.1+ds-1 | [DEBIAN-CVE-2023-22742](https://patchblox.com/security/data/fix/linux/debian-cve-2023-22742.md) | Jan 20, 2023 |
| Linux | libgit2-1.1 Ubuntu 22.04.1 LTS (jammy) | 1.1.0+dfsg.1-4.1ubuntu0.1 | [libgit2-1.1 1.1.0+dfsg.1-4.1ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-libgit2-1.1-1.1.0-dfsg.1-4.1ubuntu0.1.md) | Feb 6, 2024 |
| Linux | libgit2-26 Ubuntu 18.04.6 LTS (bionic) | 0.26.0+dfsg.1-1.1ubuntu0.2+esm1 | [libgit2-26 0.26.0+dfsg.1-1.1ubuntu0.2+esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-libgit2-26-0.26.0-dfsg.1-1.1ubuntu0.2-esm1.md) | Feb 6, 2024 |
| Linux | libgit2-28 Ubuntu 20.04 LTS (focal) | 0.28.4+dfsg.1-2ubuntu0.1 | [libgit2-28 0.28.4+dfsg.1-2ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-libgit2-28-0.28.4-dfsg.1-2ubuntu0.1.md) | Feb 6, 2024 |
| Linux | libgit2-fixtures Ubuntu 22.04.1 LTS (jammy) | 1.1.0+dfsg.1-4.1ubuntu0.1 | [libgit2-fixtures 1.1.0+dfsg.1-4.1ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-libgit2-fixtures-1.1.0-dfsg.1-4.1ubuntu0.1.md) | Feb 6, 2024 |

---

Data as of 2026-11-09T01:18:40Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
