Improper validation of certificate with host mismatch in libgit2 - CVE-2026-53583
Published: July 20, 2026
libgit2
Detailed vulnerability description
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.