Two security vulnerabilities were identified in libgit2 prior to versions 1.8.6 and 1.9.5. The first involves incorrect IP address validation in OpenSSL builds, allowing a network attacker with a CA-trusted certificate containing any IP SubjectAltName to intercept connections to IP-literal HTTPS URLs. The second is a heap out-of-bounds read triggered by a malicious Git server during the first refs-advertisement packet, potentially causing client crashes over multiple protocols. Both issues are fixed in versions 1.8.6 and 1.9.5.