Improper validation of certificate with host mismatch in libgit2 - CVE-2026-53583

 

Improper validation of certificate with host mismatch in libgit2 - CVE-2026-53583

Published: July 20, 2026


Vulnerability identifier: #VU138491
CSH Severity: Medium
CVSS v4: 6.9 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-53583
CWE-ID: CWE-297
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to bypass certificate hostname validation and perform a man-in-the-middle attack.

The vulnerability exists due to improper validation of a certificate with host mismatch in the verify_server_cert() function in src/libgit2/streams/openssl.c when verifying IP SubjectAltName entries for IP-literal HTTPS URLs. A remote attacker can present a valid CA-signed certificate containing any IP SAN to bypass certificate hostname validation and perform a man-in-the-middle attack.

Only libgit2 builds using the OpenSSL backend are affected, and exploitation requires connections to IP-literal HTTPS URLs rather than domain-name URLs.


Affected software

libgit2
Debian Linux
Fedora
rust-pretty-git-prompt
rust-libgit2-sys
rust-git-delta
rust-bat
rust-lsd
libgit2 (Debian package)
libgit2_1.9
libgit2
rust-git-interactive-rebase-tool
rust-tokei

How to mitigate CVE-2026-53583

Install security update from vendor's website.

libgit2 - addressed in versions 1.8.6, 1.9.5
rust-pretty-git-prompt - addressed in versions 0.2.2-11.fc43, 0.2.2-11.fc44
rust-libgit2-sys - addressed in versions 0.18.7-1.el9, 0.18.7-1.el10_3, 0.18.7-1.fc43, 0.18.7-1.fc44, 0.18.7-1.fc45
rust-git-delta - addressed in versions 0.19.1-7.el9, 0.19.1-7.el10_3, 0.19.1-7.fc43, 0.19.1-7.fc44
rust-bat - addressed in versions 0.26.1-2.el9, 0.26.1-3.el10_3, 0.26.1-3.fc43, 0.26.1-3.fc44
rust-lsd - addressed in versions 1.2.0-8.el9, 1.2.0-8.el10_2, 1.2.0-8.el10_3, 1.2.0-8.fc43, 1.2.0-8.fc44
libgit2 (Debian package) - update to 1.9.0+ds-2+deb13u1
libgit2_1.9 - addressed in versions 1.9.6-1.el9, 1.9.6-1.el10_3, 1.9.6-1.fc45
libgit2 - addressed in versions 1.9.6-1.fc43, 1.9.6-1.fc44
rust-git-interactive-rebase-tool - addressed in versions 2.4.1-17.fc43, 2.4.1-17.fc44
rust-tokei - addressed in versions 14.0.0-7.el9, 14.0.0-7.el10_3, 14.0.0-7.fc43, 14.0.0-7.fc44

External References

Related Security Bulletins