{"cve":"CVE-2023-22742","nvd":{"published":"2023-01-20T23:15:10.307","modified":"2026-06-17T05:36:04.797","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","score":5.9},"cwes":["CWE-347"],"references":["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"],"products":["libgit2:libgit2"],"source":"nvd","synced_at":"2026-10-19T21:37:34.931465858+00:00"},"epss":{"cve":"CVE-2023-22742","score":0.00607,"percentile":0.49046,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-m4ch-rfv5-x5g3","url":"https://osv.dev/vulnerability/GHSA-m4ch-rfv5-x5g3","summary":"git2-rs fails to verify SSH keys by default","modified":"2026-10-14T17:07:22Z","packages":[{"ecosystem":"crates.io","name":"libgit2-sys","purl":"pkg:cargo/libgit2-sys","ranges":[">=0.14.0 <0.14.2"],"fixed":["0.14.2"]},{"ecosystem":"crates.io","name":"libgit2-sys","purl":"pkg:cargo/libgit2-sys","ranges":["<0.13.5"],"fixed":["0.13.5"]},{"ecosystem":"crates.io","name":"git2","purl":"pkg:cargo/git2","ranges":["<0.16.1"],"fixed":["0.16.1"]}]},{"id":"RUSTSEC-2023-0003","url":"https://osv.dev/vulnerability/RUSTSEC-2023-0003","summary":"git2 does not verify SSH keys by default","modified":"2026-10-12T18:00:06.112206414Z","packages":[{"ecosystem":"crates.io","name":"libgit2-sys","purl":"pkg:cargo/libgit2-sys","ranges":[">=0.0.0-0 <0.13.5",">=0.14.0 <0.14.2"],"fixed":["0.13.5","0.14.2"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}