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.0: 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/E:U/U:Green
CVE-ID: CVE-2026-53583
CWE-ID: CWE-297
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: libgit2.github.com
Affected software:
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.


How to mitigate CVE-2026-53583

Install security update from vendor's website.

Sources