CVE-2026-53583: libgit2: Inverted IP SubjectAltName Comparison in OpenSSL Backend

Published Aug 20, 2026
·
Updated

libgit2 is a portable C implementation of the Git core methods provided as a linkable library with a solid API, allowing to build Git functionality into your application. Prior to 1.8.6 and 1.9.5, verifyservercert in src/libgit2/streams/openssl.c uses an inverted !!memcmp result in the GENIPADD branch when comparing an IP-literal host with a certificate IP SubjectAltName. OpenSSL builds reject matching IP addresses and accept mismatched IP addresses, allowing a network attacker with a CA-trusted certificate containing any IP SubjectAltName to intercept libgit2 connections to IP-literal HTTPS URLs. DNS SubjectAltName validation and non-OpenSSL TLS backends are not affected. This issue is fixed in versions 1.8.6 and 1.9.5.

Affected Software

1 affected component
libgit2 libgit2>1.0.0<=1.8.5, >1.8.6<=1.9.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade libgit2 to a version that resolves this vulnerability.

    Fixed in 1.8.6
  2. Upgrade

    Upgrade libgit2 to a version that resolves this vulnerability.

    Fixed in 1.9.5

Event History

Aug 20, 2026
CVE Published
via MITRE·06:39 PM
Data Sourced
via MITRE·06:39 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Affected deployments use libgit2 before 1.8.6 or 1.9.5, are built with the OpenSSL TLS backend, and connect to HTTPS URLs using an IP address literal as the host. DNS-based hostnames and non-OpenSSL TLS backends are not affected.

2

What does an attacker need to exploit it?

An attacker needs a network position to intercept the connection and a certificate trusted by the client’s CA store that contains any IP SubjectAltName. No authentication or user interaction is required.

3

What should be done if an immediate upgrade is not possible?

Avoid using IP-literal HTTPS URLs with affected OpenSSL-based libgit2 builds; use DNS hostnames instead. Upgrade to libgit2 1.8.6 or 1.9.5 when possible.

4

How can I determine whether a connection may have been vulnerable?

Check whether the application uses an affected libgit2 version with the OpenSSL backend and accesses HTTPS remotes by IP address rather than DNS name. The vulnerable validation path is specifically the certificate IP SubjectAltName comparison for IP-literal hosts.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203