Security mailing lists by PureSourceCode

CVE-2023-22742

MEDIUM 5.9CVSS 3.1

git2-rs fails to verify SSH keys by default

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.

Published
20 Jan 2023
Last modified
14 Oct 2026
Assigned by
security-advisories@github.com
NVD status
Modified
Weakness
CWE-347
Also known as
GHSA-8643-3wh5-rmjqGHSA-m4ch-rfv5-x5g3RUSTSEC-2023-0003
Sources
NVDJSONOSV GHSA-m4ch-rfv5-x5g3JSONOSV RUSTSEC-2023-0003JSON

Scores

SourceScored byVersionScoreVector / decision
OSV GitHub CVSS 3.1 MEDIUM 6.8 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
NVD nvd@nist.gov (Primary) CVSS 3.1 MEDIUM 5.9 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD security-advisories@github.com (Secondary) CVSS 3.1 MEDIUM 5.3 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD libgit2 libgit2
cpe:2.3:a:libgit2:libgit2:*:*:*:*:*:*:*:*
< 1.4.5 1.4.5
NVD libgit2 libgit2
cpe:2.3:a:libgit2:libgit2:1.5.0:*:*:*:*:*:*:*
= 1.5.0
OSV crates.io libgit2-sys >= 0.14.0, < 0.14.2 0.14.2
OSV crates.io libgit2-sys < 0.13.5 0.13.5
OSV crates.io git2 < 0.16.1 0.16.1
OSV crates.io libgit2-sys >= 0.0.0-0, < 0.13.5; >= 0.14.0, < 0.14.2 0.13.5, 0.14.2

References

History

  • 25 Nov 2026 20:35 UTC · NVD: first stored (published 20 Jan 2023)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 20 Jan 2023)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 20 Jan 2023)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.