cve.bz

CVE-2023-22742 libgit2 libgit2

5.9 mediumEPSS 0.6%Fix available

Medium (5.9) in libgit2 libgit2. EPSS 0.6% estimated probability of exploitation activity in the next 30 days. Fixed in libgit2-sys 0.13.5, 0.14.2.

On this page
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.

Severity

CVSS 3.1

5.9 medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
EPSS
0.6% (unchanged from 0.6% a week ago; 0.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 51st percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2025-03-10. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-347 Improper Verification of Cryptographic Signature
OWASP Top 10
A04:2025 Cryptographic Failures
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2023-22742 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2023-22742?via=ask-ai-copy and https://cve.bz/cve/CVE-2023-22742?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2023-22742 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
libgit2:libgit2before 1.4.5
libgit2:libgit21.5.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-m4ch-rfv5-x5g3crates.iolibgit2-sys>=0.14.0 <0.14.20.14.2
GHSA-m4ch-rfv5-x5g3crates.iolibgit2-sys<0.13.50.13.5
GHSA-m4ch-rfv5-x5g3crates.iogit2<0.16.10.16.1
RUSTSEC-2023-0003crates.iolibgit2-sys>=0.0.0-0 <0.13.5
>=0.14.0 <0.14.2
0.13.5, 0.14.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10libgit20.27.7+dfsg.1-0.2+deb10u1DLA-3340-1
Debian12, 13, 14libgit21.5.1+ds-1DEBIAN-CVE-2023-22742
Ubuntu20.04:LTSlibgit20.28.4+dfsg.1-2ubuntu0.1UBUNTU-CVE-2023-22742 USN-6678-1
Ubuntu22.04:LTSlibgit21.1.0+dfsg.1-4.1ubuntu0.1UBUNTU-CVE-2023-22742 USN-6678-1
UbuntuPro:16.04:LTSlibgit20.24.1-2ubuntu0.2+esm2UBUNTU-CVE-2023-22742 USN-6678-1
UbuntuPro:18.04:LTSlibgit20.26.0+dfsg.1-1.1ubuntu0.2+esm1UBUNTU-CVE-2023-22742 USN-6678-1
SUSELinux Enterprise Module for Development Tools 15 SP4libgit21.3.0-150400.3.6.1SUSE-SU-2023:1788-1
SUSELinux Enterprise Real Time 15 SP3, Manager Server Module 4.2, Manager Server Module 4.3libgit20.28.4-150200.3.6.1SUSE-SU-2023:1909-1
openSUSELeap 15.4libgit20.26.8-150000.3.18.1SUSE-SU-2023:1570-1
openSUSELeap 15.4libgit20.28.4-150200.3.6.1SUSE-SU-2023:1909-1
openSUSELeap 15.4libgit21.3.0-150400.3.6.1SUSE-SU-2023:1788-1
openSUSETumbleweedlibgit21.5.1-1.1openSUSE-SU-2024:12632-1
Alpinev3.17libgit21.5.1-r0ALPINE-CVE-2023-22742
Azure Linux2rust1.68.0-1AZL-13175

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's mitigation

Upgrade the package as soon as possible. Users unable to upgrade should ensure that all relevant certificates are manually checked.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 7libgit2Out of support scope
Red Hat Enterprise Linux 8libgit2Not affected
Red Hat Enterprise Linux 9rustNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2023-22742.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-24-046-11Siemens SCALANCE XCM-/XRM-3002024-02-13MultipleSCALANCE XCH328 (6GK5328-4TS01-2EC2), SCALANCE XCM324 (6GK5324-8TS01-2AC2), SCALANCE XCM328 (6GK5328-4TS01-2AC2) and 8 morenone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

Attack patterns (CAPEC)

  • CAPEC-463 Padding Oracle Crypto Attack Severity: High
  • CAPEC-475 Signature Spoofing by Improper Validation Likelihood: Low · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON