CVE-2018-10887

Source
https://nvd.nist.gov/vuln/detail/CVE-2018-10887
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2018-10887.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2018-10887
Downstream
Related
Published
2018-07-10T14:29:00Z
Modified
2025-10-15T09:17:22.136536Z
Severity
  • 8.1 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H CVSS Calculator
Summary
[none]
Details

A flaw was found in libgit2 before version 0.27.3. It has been discovered that an unexpected sign extension in gitdeltaapply function in delta.c file may lead to an integer overflow which in turn leads to an out of bound read, allowing to read before the base object. An attacker may use this flaw to leak memory addresses or cause a Denial of Service.

References

Affected packages

Git / github.com/libgit2/libgit2

Affected ranges

Type
GIT
Repo
https://github.com/libgit2/libgit2
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Fixed
Fixed

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.19.0
v0.2.0
v0.20.0
v0.21.0
v0.21.0-rc1
v0.21.0-rc2
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.24.4
v0.25.0
v0.25.0-rc1
v0.25.0-rc2
v0.25.1
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.27.1
v0.27.2
v0.3.0
v0.8.0

Database specific

{
    "vanir_signatures": [
        {
            "id": "CVE-2018-10887-1585ab76",
            "signature_type": "Function",
            "target": {
                "file": "src/delta.c",
                "function": "git_delta_apply"
            },
            "source": "https://github.com/libgit2/libgit2/commit/c1577110467b701dcbcf9439ac225ea851b47d22",
            "digest": {
                "function_hash": "50153901881954610807918949779039243924",
                "length": 1647.0
            },
            "deprecated": false,
            "signature_version": "v1"
        },
        {
            "id": "CVE-2018-10887-45eb445f",
            "signature_type": "Line",
            "target": {
                "file": "src/delta.c"
            },
            "source": "https://github.com/libgit2/libgit2/commit/3f461902dc1072acb8b7607ee65d0a0458ffac2a",
            "digest": {
                "threshold": 0.9,
                "line_hashes": [
                    "93358178968321194831444214876825155984",
                    "153164923682411593608041793273404037304",
                    "33570991496418120927041558322251026310",
                    "25890608630727613520783049424086629885",
                    "8219917613978475874616252252903839753",
                    "157188723891115284879704770483038487554",
                    "159604477385763283317304130011059385784",
                    "81904769943703288569337594233540962291",
                    "112054984904375948736070256909490718514",
                    "165913531869763643342738475326403458842",
                    "137578180004472586807634081757936950735",
                    "248693588680834188084334061751426487955",
                    "44641286980390635702979826641543948021",
                    "282553991696690259056494778295165650355",
                    "167706338245615166082035964895252361564",
                    "23084315564040188015269456616744310927",
                    "329984421577273086786058054331424958785",
                    "188314240373868938705342051951699180651",
                    "236606851842754160901515092890706080877",
                    "276132694717688210291205250221461881669",
                    "142390257640951138957146834467012636402",
                    "87133306260567778534006037764680438181",
                    "24723767431555947822021443173930564179",
                    "125740413611477975180755802450891674951",
                    "126046746389768506668085498987763294456"
                ]
            },
            "deprecated": false,
            "signature_version": "v1"
        },
        {
            "id": "CVE-2018-10887-52e70510",
            "signature_type": "Function",
            "target": {
                "file": "src/delta.c",
                "function": "git_delta_apply"
            },
            "source": "https://github.com/libgit2/libgit2/commit/3f461902dc1072acb8b7607ee65d0a0458ffac2a",
            "digest": {
                "function_hash": "30479628900503576871371879598159361351",
                "length": 1630.0
            },
            "deprecated": false,
            "signature_version": "v1"
        },
        {
            "id": "CVE-2018-10887-723ecc26",
            "signature_type": "Line",
            "target": {
                "file": "src/delta.c"
            },
            "source": "https://github.com/libgit2/libgit2/commit/c1577110467b701dcbcf9439ac225ea851b47d22",
            "digest": {
                "threshold": 0.9,
                "line_hashes": [
                    "25890608630727613520783049424086629885",
                    "205307063431193828010410566590225596596",
                    "104755187980086926400873452967897138328",
                    "246214797780804558292486128338090090245",
                    "118319113467707406452273961369960474000",
                    "128397637477622903842078481926997632109",
                    "263241811020821181855373069697997938497",
                    "116704154704623022471621320862743374716",
                    "86420227134014276184589479866678038631"
                ]
            },
            "deprecated": false,
            "signature_version": "v1"
        },
        {
            "id": "CVE-2018-10887-894982c6",
            "signature_type": "Line",
            "target": {
                "file": "tests/diff/binary.c"
            },
            "source": "https://github.com/libgit2/libgit2/commit/3f461902dc1072acb8b7607ee65d0a0458ffac2a",
            "digest": {
                "threshold": 0.9,
                "line_hashes": [
                    "321298229990734240231701353982565208171",
                    "338340993582561346439169088761704448539",
                    "72631701717246723849238254513035996107"
                ]
            },
            "deprecated": false,
            "signature_version": "v1"
        }
    ]
}