{"api_version":"1","generated_at":"2026-04-23T01:19:43+00:00","cve":"CVE-2023-22742","urls":{"html":"https://cve.report/CVE-2023-22742","api":"https://cve.report/api/cve/CVE-2023-22742.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2023-22742","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2023-22742"},"summary":{"title":"CVE-2023-22742","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.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2023-01-20 23:15:00","updated_at":"2023-11-07 04:07:00"},"problem_types":["CWE-347"],"metrics":[],"references":[{"url":"https://github.com/libgit2/libgit2/releases/tag/v1.5.1","name":"https://github.com/libgit2/libgit2/releases/tag/v1.5.1","refsource":"MISC","tags":[],"title":"Release libgit2 v1.5.1 · libgit2/libgit2 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"http://www.openwall.com/lists/oss-security/2023/11/06/5","name":"http://www.openwall.com/lists/oss-security/2023/11/06/5","refsource":"","tags":[],"title":"oss-security - Re: CVE-2022-46176: Cargo does not check SSH host keys","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.libssh2.org","name":"https://www.libssh2.org","refsource":"MISC","tags":[],"title":"libssh2","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/libgit2/libgit2/commit/cd6f679af401eda1f172402006ef8265f8bd58ea","name":"https://github.com/libgit2/libgit2/commit/cd6f679af401eda1f172402006ef8265f8bd58ea","refsource":"MISC","tags":[],"title":"Merge pull request #6449 from libgit2/1.4_ssh · libgit2/libgit2@cd6f679 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/libgit2/libgit2/security/advisories/GHSA-8643-3wh5-rmjq","name":"https://github.com/libgit2/libgit2/security/advisories/GHSA-8643-3wh5-rmjq","refsource":"MISC","tags":[],"title":"libgit2 fails to verify SSH keys by default · Advisory · libgit2/libgit2 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/libgit2/libgit2/releases/tag/v1.4.5","name":"https://github.com/libgit2/libgit2/releases/tag/v1.4.5","refsource":"MISC","tags":[],"title":"Release libgit2 v1.4.5 · libgit2/libgit2 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/libgit2/libgit2/commit/42e5db98b963ae503229c63e44e06e439df50e56","name":"https://github.com/libgit2/libgit2/commit/42e5db98b963ae503229c63e44e06e439df50e56","refsource":"MISC","tags":[],"title":"Merge pull request #6450 from libgit2/1.5_ssh · libgit2/libgit2@42e5db9 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-22742","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-22742","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2023","cve_id":"22742","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"libgit2","cpe5":"libgit2","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2023","cve_id":"22742","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"libgit2","cpe5":"libgit2","cpe6":"1.5.0","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2023-22742","qid":"181608","title":"Debian Security Update for libgit2 (DLA 3340-1)"},{"cve":"CVE-2023-22742","qid":"184202","title":"Debian Security Update for libgit2 (CVE-2023-22742)"},{"cve":"CVE-2023-22742","qid":"200167","title":"Ubuntu Security Notification for libgit2 Vulnerabilities (USN-6678-1)"},{"cve":"CVE-2023-22742","qid":"502877","title":"Alpine Linux Security Update for libgit2"},{"cve":"CVE-2023-22742","qid":"753926","title":"SUSE Enterprise Linux Security Update for libgit2 (SUSE-SU-2023:1909-1)"},{"cve":"CVE-2023-22742","qid":"905341","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for rust (13147)"},{"cve":"CVE-2023-22742","qid":"905352","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for libgit2 (13140)"},{"cve":"CVE-2023-22742","qid":"905368","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for rust (13175)"},{"cve":"CVE-2023-22742","qid":"906804","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for rust (13175-1)"}]},"source_records":{"cve_program":{"data_version":"4.0","data_type":"CVE","data_format":"MITRE","CVE_data_meta":{"ID":"CVE-2023-22742","ASSIGNER":"security-advisories@github.com","STATE":"PUBLIC"},"description":{"description_data":[{"lang":"eng","value":"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."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-347: Improper Verification of Cryptographic Signature","cweId":"CWE-347"}]}]},"affects":{"vendor":{"vendor_data":[{"vendor_name":"libgit2","product":{"product_data":[{"product_name":"libgit2","version":{"version_data":[{"version_affected":"=","version_value":"< 1.4.5"},{"version_affected":"=","version_value":"= 1.5.0"}]}}]}}]}},"references":{"reference_data":[{"url":"https://github.com/libgit2/libgit2/security/advisories/GHSA-8643-3wh5-rmjq","refsource":"MISC","name":"https://github.com/libgit2/libgit2/security/advisories/GHSA-8643-3wh5-rmjq"},{"url":"https://github.com/libgit2/libgit2/commit/42e5db98b963ae503229c63e44e06e439df50e56","refsource":"MISC","name":"https://github.com/libgit2/libgit2/commit/42e5db98b963ae503229c63e44e06e439df50e56"},{"url":"https://github.com/libgit2/libgit2/commit/cd6f679af401eda1f172402006ef8265f8bd58ea","refsource":"MISC","name":"https://github.com/libgit2/libgit2/commit/cd6f679af401eda1f172402006ef8265f8bd58ea"},{"url":"https://github.com/libgit2/libgit2/releases/tag/v1.4.5","refsource":"MISC","name":"https://github.com/libgit2/libgit2/releases/tag/v1.4.5"},{"url":"https://github.com/libgit2/libgit2/releases/tag/v1.5.1","refsource":"MISC","name":"https://github.com/libgit2/libgit2/releases/tag/v1.5.1"},{"url":"https://www.libssh2.org","refsource":"MISC","name":"https://www.libssh2.org"},{"url":"http://www.openwall.com/lists/oss-security/2023/11/06/5","refsource":"MISC","name":"http://www.openwall.com/lists/oss-security/2023/11/06/5"}]},"source":{"advisory":"GHSA-8643-3wh5-rmjq","discovery":"UNKNOWN"},"impact":{"cvss":[{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":5.3,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N","version":"3.1"}]}},"nvd":{"publishedDate":"2023-01-20 23:15:00","lastModifiedDate":"2023-11-07 04:07:00","problem_types":["CWE-347"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"HIGH","availabilityImpact":"NONE","baseScore":5.9,"baseSeverity":"MEDIUM"},"exploitabilityScore":2.2,"impactScore":3.6}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:libgit2:libgit2:*:*:*:*:*:*:*:*","versionEndExcluding":"1.4.5","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:libgit2:libgit2:1.5.0:*:*:*:*:*:*:*","cpe_name":[]}]}]}},"legacy_mitre":{"record":null,"notes":[]}}}