CVE-2026-53587

Source
https://cve.org/CVERecord?id=CVE-2026-53587
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-53587.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-53587
Aliases
  • GHSA-pm24-4jhq-3xvm
Downstream
ALPINE (1)
ALSA (2)
AZL (1)
BELL (1)
CLSA (1)
DEBIAN (1)
ECHO (1)
JLSEC (1)
MGASA (1)
MINI (1)
openSUSE (1)
RHSA (6)
RLSA (2)
UBUNTU (1)
Related
Published
2026-08-20T18:36:43Z
Modified
2026-10-28T11:09:50Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
libgit2 - Unauthenticated network-reachable heap out-of-bounds read in transports/smart_pkt.c:set_data
Details

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.

Database specific
{
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
        "CWE-125",
        "CWE-126",
        "CWE-1284",
        "CWE-20"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53587.json"
}
References

Affected packages

Git / github.com/libgit2/libgit2

Affected ranges

Type
GIT
Repo
https://github.com/libgit2/libgit2
Events
Database specific
Show details
{
    "extracted_events": [
        {
            "range": [
                {
                    "introduced": "0"
                },
                {
                    "fixed": "1.8.6"
                }
            ],
            "source": "AFFECTED_FIELD",
            "strategy": "StringRangeExpression"
        },
        {
            "range": [
                {
                    "introduced": "1.9.0"
                },
                {
                    "fixed": "1.9.5"
                }
            ],
            "source": "AFFECTED_FIELD",
            "strategy": "StringRangeExpression"
        },
        {
            "range": [
                {
                    "fixed": "2c0ce8c0132ac38ab0db28239462a671e2e5440e"
                }
            ],
            "source": "REFERENCES_COMMIT"
        },
        {
            "range": [
                {
                    "fixed": "affda60c10fcef16723451c0d7dc71b71dc20ad3"
                }
            ],
            "source": "REFERENCES_COMMIT"
        },
        {
            "range": [
                {
                    "fixed": "d7a9fb87f504434e9f45228678953c4fa56e7640"
                }
            ],
            "source": "REFERENCES_COMMIT"
        },
        {
            "original_tag": "v1.8.6",
            "range": [
                {
                    "fixed": "5853918c4c6a7b12f8becf4bd11ff4362ebb9020"
                }
            ],
            "source": "REFERENCES_TAG"
        },
        {
            "original_tag": "v1.9.5",
            "range": [
                {
                    "fixed": "f7a4071c766ceea3915415e22134cbe3e581c420"
                }
            ],
            "source": "REFERENCES_TAG"
        }
    ]
}

Affected versions

v0.*
v0.1.0
v0.10.0
v0.11.0
v0.12.0
v0.13.0
v0.14.0
v0.15.0
v0.16.0
v0.17.0
v0.18.0
v0.2.0
v0.21.0
v0.22.0
v0.22.0-rc1
v0.22.0-rc2
v0.23.0
v0.23.0-rc1
v0.23.0-rc2
v0.24.0
v0.24.0-rc1
v0.26.0
v0.26.0-rc1
v0.26.0-rc2
v0.27.0
v0.27.0-rc1
v0.27.0-rc2
v0.27.0-rc3
v0.28.0
v0.28.0-rc1
v0.3.0
v0.8.0
v0.99.0
v1.*
v1.0.0
v1.1.0
v1.2.0
v1.3.0
v1.4.0
v1.5.0
v1.6.1
v1.6.2
v1.6.3
v1.7.0
v1.8.0
v1.8.1
v1.8.3
v1.8.4
v1.8.5
v1.9.0
v1.9.1
v1.9.2
v1.9.3
v1.9.4

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-53587.json"
vanir_signatures
[
    {
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "177057447943472058086633744144048853923",
                "251528568997499059294437311657068512347",
                "263233899593817864986485995768435296270",
                "118977050417539920786203167605572346572"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2026-53587-1ad3cda7",
        "signature_type": "Line",
        "signature_version": "v1",
        "source": "https://github.com/libgit2/libgit2/commit/d7a9fb87f504434e9f45228678953c4fa56e7640",
        "target": {
            "file": "src/libgit2/transports/smart_pkt.c"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "function_hash": "200721615194512407914353922973112910719",
            "length": 1230
        },
        "id": "CVE-2026-53587-7240f0e4",
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/libgit2/libgit2/commit/affda60c10fcef16723451c0d7dc71b71dc20ad3",
        "target": {
            "file": "src/libgit2/transports/smart_pkt.c",
            "function": "set_data"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "177057447943472058086633744144048853923",
                "251528568997499059294437311657068512347",
                "129832296391823552556717622608358726660",
                "112216264362753484961119941099410836764"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2026-53587-78ef06aa",
        "signature_type": "Line",
        "signature_version": "v1",
        "source": "https://github.com/libgit2/libgit2/commit/2c0ce8c0132ac38ab0db28239462a671e2e5440e",
        "target": {
            "file": "src/libgit2/transports/smart_pkt.c"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "function_hash": "200721615194512407914353922973112910719",
            "length": 1230
        },
        "id": "CVE-2026-53587-97056e87",
        "signature_type": "Function",
        "signature_version": "v1",
        "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
        },
        "id": "CVE-2026-53587-9efce08d",
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/libgit2/libgit2/commit/2c0ce8c0132ac38ab0db28239462a671e2e5440e",
        "target": {
            "file": "src/libgit2/transports/smart_pkt.c",
            "function": "set_data"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "177057447943472058086633744144048853923",
                "251528568997499059294437311657068512347",
                "263233899593817864986485995768435296270",
                "118977050417539920786203167605572346572"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2026-53587-d2b13f5c",
        "signature_type": "Line",
        "signature_version": "v1",
        "source": "https://github.com/libgit2/libgit2/commit/affda60c10fcef16723451c0d7dc71b71dc20ad3",
        "target": {
            "file": "src/libgit2/transports/smart_pkt.c"
        }
    }
]
vanir_signatures_modified
"2026-10-28T11:09:50Z"