CVE-2026-53587

Source
https://cve.org/CVERecord?id=CVE-2026-53587
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-53587.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2026-53587
Aliases
  • GHSA-pm24-4jhq-3xvm
Downstream
Related
Published
2026-08-20T18:36:43.055Z
Modified
2026-08-22T10:47:45.254092Z
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 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.

Database specific
{
    "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"
}
References

Affected packages

Git / github.com/libgit2/libgit2

Affected ranges

Type
GIT
Repo
https://github.com/libgit2/libgit2
Events
Database specific
Show details
{
    "source": [
        "AFFECTED_FIELD",
        "REFERENCES"
    ],
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "fixed": "1.8.6"
        },
        {
            "introduced": "1.9.0"
        },
        {
            "fixed": "1.9.5"
        }
    ]
}

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/osv-test-cve-osv-conversion/osv-output/CVE-2026-53587.json"
vanir_signatures
[
    {
        "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
    }
]
vanir_signatures_modified
"2026-08-22T10:47:45Z"