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 setdata in src/libgit2/transports/smartpkt.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.
{
"cwe_ids": [
"CWE-125",
"CWE-126",
"CWE-1284",
"CWE-20"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53587.json"
}{
"source": [
"AFFECTED_FIELD",
"REFERENCES"
],
"extracted_events": [
{
"introduced": "0"
},
{
"fixed": "1.8.6"
},
{
"introduced": "1.9.0"
},
{
"fixed": "1.9.5"
}
]
}
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-53587.json"
[
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"177057447943472058086633744144048853923",
"251528568997499059294437311657068512347",
"263233899593817864986485995768435296270",
"118977050417539920786203167605572346572"
]
},
"signature_type": "Line",
"signature_version": "v1",
"id": "CVE-2026-53587-1ad3cda7",
"source": "https://github.com/libgit2/libgit2/commit/d7a9fb87f504434e9f45228678953c4fa56e7640",
"target": {
"file": "src/libgit2/transports/smart_pkt.c"
},
"deprecated": false
},
{
"digest": {
"function_hash": "200721615194512407914353922973112910719",
"length": 1230.0
},
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2026-53587-7240f0e4",
"source": "https://github.com/libgit2/libgit2/commit/affda60c10fcef16723451c0d7dc71b71dc20ad3",
"target": {
"file": "src/libgit2/transports/smart_pkt.c",
"function": "set_data"
},
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"177057447943472058086633744144048853923",
"251528568997499059294437311657068512347",
"129832296391823552556717622608358726660",
"112216264362753484961119941099410836764"
]
},
"signature_type": "Line",
"signature_version": "v1",
"id": "CVE-2026-53587-78ef06aa",
"source": "https://github.com/libgit2/libgit2/commit/2c0ce8c0132ac38ab0db28239462a671e2e5440e",
"target": {
"file": "src/libgit2/transports/smart_pkt.c"
},
"deprecated": false
},
{
"digest": {
"function_hash": "200721615194512407914353922973112910719",
"length": 1230.0
},
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2026-53587-97056e87",
"source": "https://github.com/libgit2/libgit2/commit/d7a9fb87f504434e9f45228678953c4fa56e7640",
"target": {
"file": "src/libgit2/transports/smart_pkt.c",
"function": "set_data"
},
"deprecated": false
},
{
"digest": {
"function_hash": "173194287901579505293439928511578045548",
"length": 1119.0
},
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2026-53587-9efce08d",
"source": "https://github.com/libgit2/libgit2/commit/2c0ce8c0132ac38ab0db28239462a671e2e5440e",
"target": {
"file": "src/libgit2/transports/smart_pkt.c",
"function": "set_data"
},
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"177057447943472058086633744144048853923",
"251528568997499059294437311657068512347",
"263233899593817864986485995768435296270",
"118977050417539920786203167605572346572"
]
},
"signature_type": "Line",
"signature_version": "v1",
"id": "CVE-2026-53587-d2b13f5c",
"source": "https://github.com/libgit2/libgit2/commit/affda60c10fcef16723451c0d7dc71b71dc20ad3",
"target": {
"file": "src/libgit2/transports/smart_pkt.c"
},
"deprecated": false
}
]
"2026-08-22T10:47:45Z"