← Back to CVE Explorer

CVE-2026-53587

Full vulnerability record from the local CVENow database.

Description

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.

Severity
HIGH
CVSS score
7.5 (v3.1)
Vulnerability status
Awaiting Analysis
Source identifier
Published
2026-08-20 19:16:55.137000
Last modified
2026-10-26 10:10:00.140000
View original CVE JSON
{
  "id": "CVE-2026-53587",
  "sourceIdentifier": "[email protected]",
  "published": "2026-08-20T19:16:55.137",
  "lastModified": "2026-10-26T10:10:00.140",
  "vulnStatus": "Awaiting Analysis",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "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."
    },
    {
      "lang": "es",
      "value": "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."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "libgit2",
          "product": "libgit2",
          "versions": [
            {
              "version": "< 1.8.6",
              "status": "affected"
            },
            {
              "version": ">= 1.9.0, < 1.9.5",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
          "baseScore": 7.5,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "NONE",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 3.9,
        "impactScore": 3.6
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-08-20T19:18:28.320266Z",
          "id": "CVE-2026-53587",
          "options": [
            {
              "exploitation": "poc"
            },
            {
              "automatable": "yes"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-20"
        },
        {
          "lang": "en",
          "value": "CWE-125"
        },
        {
          "lang": "en",
          "value": "CWE-126"
        },
        {
          "lang": "en",
          "value": "CWE-1284"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/libgit2/libgit2/commit/2c0ce8c0132ac38ab0db28239462a671e2e5440e",
      "source": "[email protected]"
    },
    {
      "url": "https://github.com/libgit2/libgit2/commit/affda60c10fcef16723451c0d7dc71b71dc20ad3",
      "source": "[email protected]"
    },
    {
      "url": "https://github.com/libgit2/libgit2/commit/d7a9fb87f504434e9f45228678953c4fa56e7640",
      "source": "[email protected]"
    },
    {
      "url": "https://github.com/libgit2/libgit2/releases/tag/v1.8.6",
      "source": "[email protected]"
    },
    {
      "url": "https://github.com/libgit2/libgit2/releases/tag/v1.9.5",
      "source": "[email protected]"
    },
    {
      "url": "https://github.com/libgit2/libgit2/security/advisories/GHSA-pm24-4jhq-3xvm",
      "source": "[email protected]"
    },
    {
      "url": "https://github.com/libgit2/libgit2/security/advisories/GHSA-pm24-4jhq-3xvm",
      "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"
    }
  ]
}