CVE-2023-22742
published medium CVSS 3.1 · 5.3libgit2 fails to verify SSH keys by default
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| libgit2 | — | libgit2< 1.4.5 · = 1.5.0 | Affected | Not stated | GitHub_M |
| Alpine Linux | v3.17 | libgit2 | Fixed | 1.5.1-r0 | Package fix record |
| Debian | buster | libgit2 | Advisory build | 0.27.7+dfsg.1-0.2+deb10u1 | DLA-3340-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2aarch64 | Advisory build | 1.5.1-1.1 | OPENSUSE-SU-2024:12632-1 |
| Ubuntu | bionic | libgit2 | Advisory build | 0.26.0+dfsg.1-1.1ubuntu0.2+esm1 | USN-6678-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2ppc64le | Advisory build | 1.5.1-1.1 | OPENSUSE-SU-2024:12632-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2s390x | Advisory build | 1.5.1-1.1 | OPENSUSE-SU-2024:12632-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2x86_64 | Advisory build | 1.5.1-1.1 | OPENSUSE-SU-2024:12632-1 |
Show 45 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Ubuntu | focal | libgit2 | Advisory build | 0.28.4+dfsg.1-2ubuntu0.1 | USN-6678-1 |
| Ubuntu | jammy | libgit2 | Advisory build | 1.1.0+dfsg.1-4.1ubuntu0.1 | USN-6678-1 |
| Ubuntu | xenial | libgit2 | Advisory build | 0.24.1-2ubuntu0.2+esm2 | USN-6678-1 |
| SUSE / openSUSE | SLE-15-SP3 | libgit2-28x86_64 | Advisory build | 0.28.4-150200.3.6.1 | SUSE-SU-2023:1909-1 |
| SUSE / openSUSE | SLE-15-SP3 | libgit2-develx86_64 | Advisory build | 0.28.4-150200.3.6.1 | SUSE-SU-2023:1909-1 |
| SUSE / openSUSE | SLE-15-SP4 | libgit2-1_3aarch64 | Advisory build | 1.3.0-150400.3.6.1 | SUSE-SU-2023:1788-1 |
| SUSE / openSUSE | SLE-15-SP4 | libgit2-1_3ppc64le | Advisory build | 1.3.0-150400.3.6.1 | SUSE-SU-2023:1788-1 |
| SUSE / openSUSE | SLE-15-SP4 | libgit2-1_3s390x | Advisory build | 1.3.0-150400.3.6.1 | SUSE-SU-2023:1788-1 |
| SUSE / openSUSE | SLE-15-SP4 | libgit2-1_3x86_64 | Advisory build | 1.3.0-150400.3.6.1 | SUSE-SU-2023:1788-1 |
| SUSE / openSUSE | SLE-15-SP4 | libgit2-develaarch64 | Advisory build | 1.3.0-150400.3.6.1 | SUSE-SU-2023:1788-1 |
| SUSE / openSUSE | SLE-15-SP4 | libgit2-develppc64le | Advisory build | 1.3.0-150400.3.6.1 | SUSE-SU-2023:1788-1 |
| SUSE / openSUSE | SLE-15-SP4 | libgit2-devels390x | Advisory build | 1.3.0-150400.3.6.1 | SUSE-SU-2023:1788-1 |
| SUSE / openSUSE | SLE-15-SP4 | libgit2-develx86_64 | Advisory build | 1.3.0-150400.3.6.1 | SUSE-SU-2023:1788-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | libgit2-1_3aarch64 | Advisory build | 1.3.0-150400.3.6.1 | SUSE-SU-2023:1788-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | libgit2-1_3ppc64le | Advisory build | 1.3.0-150400.3.6.1 | SUSE-SU-2023:1788-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | libgit2-1_3s390x | Advisory build | 1.3.0-150400.3.6.1 | SUSE-SU-2023:1788-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | libgit2-1_3x86_64 | Advisory build | 1.3.0-150400.3.6.1 | SUSE-SU-2023:1788-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | libgit2-1_3-32bitx86_64 | Advisory build | 1.3.0-150400.3.6.1 | SUSE-SU-2023:1788-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | libgit2-26aarch64 | Advisory build | 0.26.8-150000.3.18.1 | SUSE-SU-2023:1570-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | libgit2-26ppc64le | Advisory build | 0.26.8-150000.3.18.1 | SUSE-SU-2023:1570-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | libgit2-26s390x | Advisory build | 0.26.8-150000.3.18.1 | SUSE-SU-2023:1570-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | libgit2-26x86_64 | Advisory build | 0.26.8-150000.3.18.1 | SUSE-SU-2023:1570-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | libgit2-26-32bitx86_64 | Advisory build | 0.26.8-150000.3.18.1 | SUSE-SU-2023:1570-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | libgit2-28aarch64 | Advisory build | 0.28.4-150200.3.6.1 | SUSE-SU-2023:1909-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | libgit2-28ppc64le | Advisory build | 0.28.4-150200.3.6.1 | SUSE-SU-2023:1909-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | libgit2-28s390x | Advisory build | 0.28.4-150200.3.6.1 | SUSE-SU-2023:1909-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | libgit2-28x86_64 | Advisory build | 0.28.4-150200.3.6.1 | SUSE-SU-2023:1909-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | libgit2-28-32bitx86_64 | Advisory build | 0.28.4-150200.3.6.1 | SUSE-SU-2023:1909-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | libgit2-develaarch64 | Advisory build | 1.3.0-150400.3.6.1 | SUSE-SU-2023:1788-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | libgit2-develppc64le | Advisory build | 1.3.0-150400.3.6.1 | SUSE-SU-2023:1788-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | libgit2-devels390x | Advisory build | 1.3.0-150400.3.6.1 | SUSE-SU-2023:1788-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | libgit2-develx86_64 | Advisory build | 1.3.0-150400.3.6.1 | SUSE-SU-2023:1788-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-1_5aarch64 | Advisory build | 1.5.1-1.1 | OPENSUSE-SU-2024:12632-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-1_5ppc64le | Advisory build | 1.5.1-1.1 | OPENSUSE-SU-2024:12632-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-1_5s390x | Advisory build | 1.5.1-1.1 | OPENSUSE-SU-2024:12632-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-1_5x86_64 | Advisory build | 1.5.1-1.1 | OPENSUSE-SU-2024:12632-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-develaarch64 | Advisory build | 1.5.1-1.1 | OPENSUSE-SU-2024:12632-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-develppc64le | Advisory build | 1.5.1-1.1 | OPENSUSE-SU-2024:12632-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-devels390x | Advisory build | 1.5.1-1.1 | OPENSUSE-SU-2024:12632-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-develx86_64 | Advisory build | 1.5.1-1.1 | OPENSUSE-SU-2024:12632-1 |
| Ubuntu | bionic | libgit2-26 | Advisory build | 0.26.0+dfsg.1-1.1ubuntu0.2+esm1 | USN-6678-1 |
| Ubuntu | focal | libgit2-28 | Advisory build | 0.28.4+dfsg.1-2ubuntu0.1 | USN-6678-1 |
| Ubuntu | jammy | libgit2-1.1 | Advisory build | 1.1.0+dfsg.1-4.1ubuntu0.1 | USN-6678-1 |
| Ubuntu | jammy | libgit2-fixtures | Advisory build | 1.1.0+dfsg.1-4.1ubuntu0.1 | USN-6678-1 |
| Ubuntu | xenial | libgit2-24 | Advisory build | 0.24.1-2ubuntu0.2+esm2 | USN-6678-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 5.3 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| libgit2 | libgit2 | < 1.4.5 (affected)= 1.5.0 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-347 CWE-347: Improper Verification of Cryptographic Signature
References
7- http://www.openwall.com/lists/oss-security/2023/11/06/5
- https://github.com/libgit2/libgit2/commit/42e5db98b963ae503229c63e44e06e439df50e56
- https://github.com/libgit2/libgit2/commit/cd6f679af401eda1f172402006ef8265f8bd58ea
- https://github.com/libgit2/libgit2/releases/tag/v1.4.5
- https://github.com/libgit2/libgit2/releases/tag/v1.5.1
- https://github.com/libgit2/libgit2/security/advisories/GHSA-8643-3wh5-rmjq
- https://www.libssh2.org
Provider assertions
3GitHub_M · cna
libgit2 fails to verify SSH keys by default
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- a7ce6e10cc6b16fc821f34bbcf8514f184eeb6c334b7ba533043e9ecc67de215
- Ingested
- 23 Sep 2026, 08:06:15 UTC
- Source record
- Official CVE record