CVE-2026-53587

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, libgit2 performs a fixed-size strncmp in set_data in src/libgit2/transports/smart_pkt.c without first verifying that the smart-protocol pkt-line capability buffer contains 14 bytes. A malicious Git server can make bytes after the pkt-line complete object-format=, causing format_str to advance beyond the pkt-line and the following memchr length calculation to underflow. The resulting heap out-of-bounds walk can crash a client during the first refs-advertisement packet over HTTP, HTTPS, SSH, or the Git protocol. This issue is fixed in versions 1.8.6 and 1.9.5.
Configurations

No configuration.

History

26 Oct 2026, 10:10

Type Values Removed Values Added
Summary
  • (es) libgit2 es una implementación portátil en C de los métodos centrales de Git proporcionada como una biblioteca enlazable con una API sólida, que permite integrar la funcionalidad de Git en su aplicación. Antes de las versiones 1.8.6 y 1.9.5, libgit2 realiza un strncmp de tamaño fijo en set_data en src/libgit2/transports/smart_pkt.c sin verificar primero que el búfer de capacidad pkt-line del protocolo inteligente contenga 14 bytes. Un servidor Git malicioso puede hacer que los bytes después de la pkt-line completen object-format=, haciendo que format_str avance más allá de la pkt-line y que el cálculo de longitud de memchr subsiguiente sufra un desbordamiento negativo. El recorrido resultante de la memoria dinámica (heap) fuera de límites puede bloquear a un cliente durante el primer paquete de anuncio de referencias a través de HTTP, HTTPS, SSH o el protocolo Git. Este problema está solucionado en las versiones 1.8.6 y 1.9.5.

Information

Published : 2026-08-20 19:16

Updated : 2026-10-26 10:10


NVD link : CVE-2026-53587

Mitre link : CVE-2026-53587

CVE.ORG link : CVE-2026-53587


JSON object : View

Products Affected

No product.

CWE
CWE-20

Improper Input Validation

CWE-125

Out-of-bounds Read

CWE-126

Buffer Over-read

CWE-1284

Improper Validation of Specified Quantity in Input