CVE-2023-22742libgit2 fails to verify SSH keys by default
- 5.3MediumCVSS base score
- 0.61%Exploitation in 30 daysEPSS · top 50% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By GitHub_M
- 14 days later
· 14 days later
Published
- 2 years later
· 2 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium5.3 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N |
| NVDNVD · Modified | 3.1 | Medium5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N |
- EPSS (exploitation in 30 days)
- 0.61% · top 50% of all CVEs (18 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 5.3.
Affected products
References
References7
- https://github.com/libgit2/libgit2/security/advisories/GHSA-8643-3wh5-rmjq (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/libgit2/libgit2/commit/42e5db98b963ae503229c63e44e06e439df50e56 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/libgit2/libgit2/commit/cd6f679af401eda1f172402006ef8265f8bd58ea (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/libgit2/libgit2/releases/tag/v1.4.5 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/libgit2/libgit2/releases/tag/v1.5.1 (opens in a new tab)x_refsource_MISCx_transferred
- https://www.libssh2.org (opens in a new tab)x_refsource_MISCx_transferred
- http://www.openwall.com/lists/oss-security/2023/11/06/5 (opens in a new tab)x_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2023-26860 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2023-22742)Record last updated .