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, the built-in HTTP transport in src/libgit2/transports/http.c follows an offsite initial redirect, and handleremoteauth and handleauth pass transport->owner->url instead of transport->server.url to the credential callback when the redirected host returns 401 Unauthorized. A callback that scopes credentials to the original trusted URL can therefore return GITCREDENTIALUSERPASSPLAINTEXT credentials that libgit2 stores in transport->server.cred and sends as an Authorization header to the redirected host. An attacker who controls a trusted Git host or an open redirect on that host can disclose HTTP Basic credentials, personal access tokens, or equivalent credentials. This issue is fixed in versions 1.8.6 and 1.9.5.
{
"cwe_ids": [
"CWE-200",
"CWE-522",
"CWE-601"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53586.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-53586.json"
[
{
"digest": {
"function_hash": "225777753145150605025461996781650096255",
"length": 484.0
},
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2026-53586-088f72fb",
"source": "https://github.com/libgit2/libgit2/commit/af2b29ad0a74d5bac9751376879ddaf848136d3b",
"target": {
"file": "src/libgit2/transports/http.c",
"function": "handle_remote_auth"
},
"deprecated": false
},
{
"digest": {
"function_hash": "225777753145150605025461996781650096255",
"length": 484.0
},
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2026-53586-11a1dc0d",
"source": "https://github.com/libgit2/libgit2/commit/07de6a7e438f95ac9a6efd3222a82117e871ed27",
"target": {
"file": "src/libgit2/transports/http.c",
"function": "handle_remote_auth"
},
"deprecated": false
},
{
"digest": {
"function_hash": "233054586897221852713287291746647347337",
"length": 1529.0
},
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2026-53586-12e2fb4b",
"source": "https://github.com/libgit2/libgit2/commit/c1507abc44647b3acd832a33a5b1c8c9f5ba8821",
"target": {
"file": "tests/libgit2/online/clone.c",
"function": "test_online_clone__cleanup"
},
"deprecated": false
},
{
"digest": {
"function_hash": "208966527604137913452720017806345171563",
"length": 2456.0
},
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2026-53586-3dce8ea4",
"source": "https://github.com/libgit2/libgit2/commit/c1507abc44647b3acd832a33a5b1c8c9f5ba8821",
"target": {
"file": "tests/libgit2/online/clone.c",
"function": "test_online_clone__initialize"
},
"deprecated": false
},
{
"digest": {
"function_hash": "21239647138274559075372053953119188355",
"length": 876.0
},
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2026-53586-3e40b2ad",
"source": "https://github.com/libgit2/libgit2/commit/07de6a7e438f95ac9a6efd3222a82117e871ed27",
"target": {
"file": "src/libgit2/transports/http.c",
"function": "handle_auth"
},
"deprecated": false
},
{
"digest": {
"function_hash": "292090992641920243916529641330655405346",
"length": 485.0
},
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2026-53586-49e05fb5",
"source": "https://github.com/libgit2/libgit2/commit/07de6a7e438f95ac9a6efd3222a82117e871ed27",
"target": {
"file": "src/libgit2/transports/http.c",
"function": "handle_proxy_auth"
},
"deprecated": false
},
{
"digest": {
"function_hash": "292090992641920243916529641330655405346",
"length": 485.0
},
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2026-53586-4e5821fd",
"source": "https://github.com/libgit2/libgit2/commit/c1507abc44647b3acd832a33a5b1c8c9f5ba8821",
"target": {
"file": "src/libgit2/transports/http.c",
"function": "handle_proxy_auth"
},
"deprecated": false
},
{
"digest": {
"function_hash": "225777753145150605025461996781650096255",
"length": 484.0
},
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2026-53586-5ab125b5",
"source": "https://github.com/libgit2/libgit2/commit/c1507abc44647b3acd832a33a5b1c8c9f5ba8821",
"target": {
"file": "src/libgit2/transports/http.c",
"function": "handle_remote_auth"
},
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"292894123169329908573221382736719689130",
"45691261651861175910323428934692818972",
"219899257416663776281737352721997551642",
"30471715161870962019297185028303214131",
"242587518969759694907851457444711161959",
"70770410110744336111878526066025820786",
"194940770660331527869366277062606724607",
"275810513160097991676880721772596738911",
"78362828072653138263658392132753516808",
"50138403786554015781826161590171684170",
"333189531666698533891715896143604570877",
"134032226687034903566410851966269299282",
"72560919542960246025669722317294072353",
"334285288392661952764871398094729519093",
"193796507953802999933366682774306510472",
"231452813322631493322072844986568107104",
"211343763167986509495999619827877561891",
"140449934440117550191088601710543942578",
"64011064049084059199643514393210194407",
"219912261095537977924916121581914830221",
"51566544700613081438128040857558996849",
"142952878320961461080373012960076024380",
"229448456093366795252439917047840744618",
"270873070110245987944929675883864723124"
]
},
"signature_type": "Line",
"signature_version": "v1",
"id": "CVE-2026-53586-5c51d95b",
"source": "https://github.com/libgit2/libgit2/commit/07de6a7e438f95ac9a6efd3222a82117e871ed27",
"target": {
"file": "src/libgit2/transports/http.c"
},
"deprecated": false
},
{
"digest": {
"function_hash": "233054586897221852713287291746647347337",
"length": 1529.0
},
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2026-53586-78120b91",
"source": "https://github.com/libgit2/libgit2/commit/af2b29ad0a74d5bac9751376879ddaf848136d3b",
"target": {
"file": "tests/libgit2/online/clone.c",
"function": "test_online_clone__cleanup"
},
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"207909918685542922194069116414492615160",
"197067467139848598089052440033377304406",
"65681440121537140446997009633710404987",
"97272094557745585854865076390484422450",
"208001022395309591442951817173319934324",
"212069330643619758999620758861947688190",
"11885606860653938567608852324350465736",
"99399674368632812525892289471140314689",
"234187364873800601306647599915623070170",
"234355497808159258713584416816293600450",
"306188306624947179506676525626315306546",
"106192263403950942011794048335960771633",
"213030130174614358305683339818141234705"
]
},
"signature_type": "Line",
"signature_version": "v1",
"id": "CVE-2026-53586-7d4ada68",
"source": "https://github.com/libgit2/libgit2/commit/07de6a7e438f95ac9a6efd3222a82117e871ed27",
"target": {
"file": "tests/libgit2/online/clone.c"
},
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"207909918685542922194069116414492615160",
"197067467139848598089052440033377304406",
"65681440121537140446997009633710404987",
"97272094557745585854865076390484422450",
"208001022395309591442951817173319934324",
"212069330643619758999620758861947688190",
"11885606860653938567608852324350465736",
"99399674368632812525892289471140314689",
"234187364873800601306647599915623070170",
"234355497808159258713584416816293600450",
"306188306624947179506676525626315306546",
"106192263403950942011794048335960771633",
"213030130174614358305683339818141234705"
]
},
"signature_type": "Line",
"signature_version": "v1",
"id": "CVE-2026-53586-aa4eb043",
"source": "https://github.com/libgit2/libgit2/commit/c1507abc44647b3acd832a33a5b1c8c9f5ba8821",
"target": {
"file": "tests/libgit2/online/clone.c"
},
"deprecated": false
},
{
"digest": {
"function_hash": "292090992641920243916529641330655405346",
"length": 485.0
},
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2026-53586-aca59c2e",
"source": "https://github.com/libgit2/libgit2/commit/af2b29ad0a74d5bac9751376879ddaf848136d3b",
"target": {
"file": "src/libgit2/transports/http.c",
"function": "handle_proxy_auth"
},
"deprecated": false
},
{
"digest": {
"function_hash": "264647579742310606301819543959917002906",
"length": 2388.0
},
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2026-53586-b4f61fea",
"source": "https://github.com/libgit2/libgit2/commit/af2b29ad0a74d5bac9751376879ddaf848136d3b",
"target": {
"file": "tests/libgit2/online/clone.c",
"function": "test_online_clone__initialize"
},
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"292894123169329908573221382736719689130",
"45691261651861175910323428934692818972",
"219899257416663776281737352721997551642",
"30471715161870962019297185028303214131",
"242587518969759694907851457444711161959",
"70770410110744336111878526066025820786",
"194940770660331527869366277062606724607",
"275810513160097991676880721772596738911",
"78362828072653138263658392132753516808",
"50138403786554015781826161590171684170",
"333189531666698533891715896143604570877",
"134032226687034903566410851966269299282",
"72560919542960246025669722317294072353",
"334285288392661952764871398094729519093",
"193796507953802999933366682774306510472",
"231452813322631493322072844986568107104",
"211343763167986509495999619827877561891",
"140449934440117550191088601710543942578",
"64011064049084059199643514393210194407",
"219912261095537977924916121581914830221",
"51566544700613081438128040857558996849",
"142952878320961461080373012960076024380",
"229448456093366795252439917047840744618",
"270873070110245987944929675883864723124"
]
},
"signature_type": "Line",
"signature_version": "v1",
"id": "CVE-2026-53586-b6d0b224",
"source": "https://github.com/libgit2/libgit2/commit/af2b29ad0a74d5bac9751376879ddaf848136d3b",
"target": {
"file": "src/libgit2/transports/http.c"
},
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"292894123169329908573221382736719689130",
"45691261651861175910323428934692818972",
"219899257416663776281737352721997551642",
"30471715161870962019297185028303214131",
"242587518969759694907851457444711161959",
"70770410110744336111878526066025820786",
"194940770660331527869366277062606724607",
"275810513160097991676880721772596738911",
"78362828072653138263658392132753516808",
"50138403786554015781826161590171684170",
"333189531666698533891715896143604570877",
"134032226687034903566410851966269299282",
"72560919542960246025669722317294072353",
"334285288392661952764871398094729519093",
"193796507953802999933366682774306510472",
"231452813322631493322072844986568107104",
"211343763167986509495999619827877561891",
"140449934440117550191088601710543942578",
"64011064049084059199643514393210194407",
"219912261095537977924916121581914830221",
"51566544700613081438128040857558996849",
"142952878320961461080373012960076024380",
"229448456093366795252439917047840744618",
"270873070110245987944929675883864723124"
]
},
"signature_type": "Line",
"signature_version": "v1",
"id": "CVE-2026-53586-b87693ee",
"source": "https://github.com/libgit2/libgit2/commit/c1507abc44647b3acd832a33a5b1c8c9f5ba8821",
"target": {
"file": "src/libgit2/transports/http.c"
},
"deprecated": false
},
{
"digest": {
"function_hash": "264647579742310606301819543959917002906",
"length": 2388.0
},
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2026-53586-ba9114ea",
"source": "https://github.com/libgit2/libgit2/commit/07de6a7e438f95ac9a6efd3222a82117e871ed27",
"target": {
"file": "tests/libgit2/online/clone.c",
"function": "test_online_clone__initialize"
},
"deprecated": false
},
{
"digest": {
"function_hash": "21239647138274559075372053953119188355",
"length": 876.0
},
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2026-53586-c1921f98",
"source": "https://github.com/libgit2/libgit2/commit/af2b29ad0a74d5bac9751376879ddaf848136d3b",
"target": {
"file": "src/libgit2/transports/http.c",
"function": "handle_auth"
},
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"207909918685542922194069116414492615160",
"197067467139848598089052440033377304406",
"65681440121537140446997009633710404987",
"97272094557745585854865076390484422450",
"208001022395309591442951817173319934324",
"212069330643619758999620758861947688190",
"11885606860653938567608852324350465736",
"99399674368632812525892289471140314689",
"234187364873800601306647599915623070170",
"234355497808159258713584416816293600450",
"306188306624947179506676525626315306546",
"106192263403950942011794048335960771633",
"213030130174614358305683339818141234705"
]
},
"signature_type": "Line",
"signature_version": "v1",
"id": "CVE-2026-53586-d6d39e08",
"source": "https://github.com/libgit2/libgit2/commit/af2b29ad0a74d5bac9751376879ddaf848136d3b",
"target": {
"file": "tests/libgit2/online/clone.c"
},
"deprecated": false
},
{
"digest": {
"function_hash": "233054586897221852713287291746647347337",
"length": 1529.0
},
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2026-53586-fb84acbf",
"source": "https://github.com/libgit2/libgit2/commit/07de6a7e438f95ac9a6efd3222a82117e871ed27",
"target": {
"file": "tests/libgit2/online/clone.c",
"function": "test_online_clone__cleanup"
},
"deprecated": false
},
{
"digest": {
"function_hash": "21239647138274559075372053953119188355",
"length": 876.0
},
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2026-53586-fc774637",
"source": "https://github.com/libgit2/libgit2/commit/c1507abc44647b3acd832a33a5b1c8c9f5ba8821",
"target": {
"file": "src/libgit2/transports/http.c",
"function": "handle_auth"
},
"deprecated": false
}
]
"2026-08-23T10:47:10Z"