{"schemaVersion":3,"id":"CVE-2022-39260","aliases":["ALPINE-CVE-2022-39260","UBUNTU-CVE-2022-39260","USN-5686-2","DEBIAN-CVE-2022-39260","CGA-ffj7-6wph-82qp","CGA-pm42-q8fw-wjw7"],"status":"published","duplicateOf":null,"title":null,"description":"Git is an open source, scalable, distributed revision control system. `git shell` is a restricted login shell that can be used to implement Git's push/pull functionality via SSH. In versions prior to 2.30.6, 2.31.5, 2.32.4, 2.33.5, 2.34.5, 2.35.5, 2.36.3, and 2.37.4, the function that splits the command arguments into an array improperly uses an `int` to represent the number of entries in the array, allowing a malicious actor to intentionally overflow the return value, leading to arbitrary heap writes. Because the resulting array is then passed to `execv()`, it is possible to leverage this attack to gain remote code execution on a victim machine. Note that a victim must first allow access to `git shell` as a login shell in order to be vulnerable to this attack. This problem is patched in versions 2.30.6, 2.31.5, 2.32.4, 2.33.5, 2.34.5, 2.35.5, 2.36.3, and 2.37.4 and users are advised to upgrade to the latest version. Disabling `git shell` access via remote logins is a viable short-term workaround.","dates":{"published":"2022-10-19T00:00:00.000Z","modified":"2024-08-03T12:00:43.573Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":8.8,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":8.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Alpine","score":8.8,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","exploitability":7.2,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":8.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","exploitability":4.6,"impact":10,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":8.8,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","exploitability":7.2,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Wolfi","score":8.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","exploitability":4.6,"impact":10,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Chainguard","score":8.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","exploitability":4.6,"impact":10,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":8.8,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.03987,"percentile":0.90398,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0.7280000000000002,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.03259},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.03259,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.03259,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.03259,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.03259,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.03259,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.03259,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.03259,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.03259,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.03259,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.03259,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.03987,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.03987,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.03987,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.03987,"percentile":0.90398}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.03259,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.03259,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.03259,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.03259,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.03259,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.03275,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.03987,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.03987,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.03987,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.03987,"percentile":0.90398}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-122","name":"Heap-based Buffer Overflow","description":"A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().","type":"weakness","status":"Draft","abstraction":"Variant","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/122.html"},{"id":"CWE-787","name":"Out-of-bounds Write","description":"The product writes data past the end, or before the beginning, of the intended buffer.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/787.html"}],"affected":[{"vendor":"alpine","product":"git","name":"git","label":"git","ecosystem":"Alpine Linux","cpePart":null,"purl":"pkg:apk/alpine/git","purlType":"apk","versions":[{"text":"≥ 2.31.0, < 2.30.6-r0","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.31.0, < 2.32.4-r0","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.31.0, < 2.34.5-r0","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.31.0, < 2.36.3-r0","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.31.0, < 2.38.1-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 2.31.0, < 2.30.6-r0 | ≥ 2.31.0, < 2.32.4-r0 | ≥ 2.31.0, < 2.34.5-r0 | ≥ 2.31.0, < 2.36.3-r0 | ≥ 2.31.0, < 2.38.1-r0","eol":null,"hubHref":null},{"vendor":"chainguard","product":"git","name":"git","label":"git","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/git","purlType":"apk","versions":[{"text":"< 2.38.1-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2.38.1-r0","eol":null,"hubHref":null},{"vendor":"wolfi","product":"git","name":"git","label":"git","ecosystem":"Wolfi","cpePart":null,"purl":"pkg:apk/wolfi/git","purlType":"apk","versions":[{"text":"< 2.38.1-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2.38.1-r0","eol":null,"hubHref":null},{"vendor":"apple","product":"xcode","name":"Xcode","label":"xcode","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 14.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 14.1","eol":null,"hubHref":"/vendor/apple/xcode"},{"vendor":"debian","product":"git","name":"git","label":"git","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/git","purlType":"deb","versions":[{"text":"< 1:2.38.1-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1:2.38.1-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"git","name":"git","label":"git","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/git","purlType":"deb","versions":[{"text":"< 1:2.17.1-1ubuntu0.13","noFixRecorded":false,"fixedIn":null},{"text":"< 1:2.25.1-1ubuntu3.6","noFixRecorded":false,"fixedIn":null},{"text":"< 1:2.34.1-1ubuntu1.5","noFixRecorded":false,"fixedIn":null},{"text":"< 1:2.7.4-0ubuntu1.10+esm3","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1:2.17.1-1ubuntu0.13 | < 1:2.25.1-1ubuntu3.6 | < 1:2.34.1-1ubuntu1.5 | < 1:2.7.4-0ubuntu1.10+esm3","eol":null,"hubHref":null},{"vendor":"debian","product":"debian_linux","name":"debian linux","label":"debian_linux","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"10.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"10.0","eol":{"isEol":true,"eolDate":"2024-06-30T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"10","label":"10 (Buster)","eolFrom":"2024-06-30T00:00:00.000Z","isLts":false,"isMaintained":true,"latestVersion":"10.13"},"product":{"name":"debian","label":"Debian","category":"os"}},"hubHref":"/vendor/debian/debian_linux"},{"vendor":"fedoraproject","product":"fedora","name":"fedora","label":"fedora","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"35","noFixRecorded":false,"fixedIn":null},{"text":"36","noFixRecorded":false,"fixedIn":null},{"text":"37","noFixRecorded":false,"fixedIn":null}],"versionsText":"35 | 36 | 37","eol":{"isEol":true,"eolDate":"2022-12-13T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"35","label":"35","eolFrom":"2022-12-13T00:00:00.000Z","isLts":false,"isMaintained":false,"latestVersion":null},"product":{"name":"fedora","label":"Fedora Linux","category":"os"}},"hubHref":"/vendor/fedoraproject/fedora"},{"vendor":"git-scm","product":"git","name":"git","label":"git","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 2.30.6","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.31.0, < 2.31.5","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.32.0, < 2.32.4","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.33.0, < 2.33.5","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.34.0, < 2.34.5","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.35.0, < 2.35.5","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.36.0, < 2.36.3","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.37.0, < 2.37.4","noFixRecorded":false,"fixedIn":null},{"text":"2.38.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2.30.6 | ≥ 2.31.0, < 2.31.5 | ≥ 2.32.0, < 2.32.4 | ≥ 2.33.0, < 2.33.5 | ≥ 2.34.0, < 2.34.5 | ≥ 2.35.0, < 2.35.5 | ≥ 2.36.0, < 2.36.3 | ≥ 2.37.0, < 2.37.4 | 2.38.0","eol":null,"hubHref":"/vendor/git-scm/git"},{"vendor":"git","product":"git","name":"Git","label":"git","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 2.30.6","noFixRecorded":false,"fixedIn":null},{"text":"> 2.31.0, < 2.31.5","noFixRecorded":false,"fixedIn":null},{"text":"> 2.32.0, < 2.32.4","noFixRecorded":false,"fixedIn":null},{"text":"> 2.33.0, < 2.33.5","noFixRecorded":false,"fixedIn":null},{"text":"> 2.34.0, < 2.34.5","noFixRecorded":false,"fixedIn":null},{"text":"> 2.34.0, < 2.35.5","noFixRecorded":false,"fixedIn":null},{"text":"> 2.35.0, < 2.36.3","noFixRecorded":false,"fixedIn":null},{"text":"> 2.37.0, < 2.37.4","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2.30.6 | > 2.31.0, < 2.31.5 | > 2.32.0, < 2.32.4 | > 2.33.0, < 2.33.5 | > 2.34.0, < 2.34.5 | > 2.34.0, < 2.35.5 | > 2.35.0, < 2.36.3 | > 2.37.0, < 2.37.4","eol":null,"hubHref":"/vendor/git/git"}],"affectedCount":10,"eol":{"hasEol":true,"count":2},"references":[{"url":"https://github.com/git/git/security/advisories/GHSA-rjr6-wcq6-83p6","label":"github.com/git/git/security/advisories/GHSA-rjr6-wcq6-83p6","hostname":"github.com","tags":["Advisory","Mitigation","Third Party Advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UKFHE4KVD7EKS5J3KTDFVBEKU3CLXGVV/","label":"lists.fedoraproject.org/archives/…","hostname":"lists.fedoraproject.org","tags":["Vendor Advisory","Advisory"]},{"url":"https://support.apple.com/kb/HT213496","label":"support.apple.com/kb/HT213496","hostname":"support.apple.com","tags":["WEB","Third Party Advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OHNO2FB55CPX47BAXMBWUBGWHO6N6ZZH/","label":"lists.fedoraproject.org/archives/…","hostname":"lists.fedoraproject.org","tags":["Vendor Advisory","Advisory"]},{"url":"http://seclists.org/fulldisclosure/2022/Nov/1","label":"seclists.org/fulldisclosure/2022/Nov/1","hostname":"seclists.org","tags":["Mailing List","ARTICLE","Third Party Advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/C7B6JPKX5CGGLAHXJVQMIZNNEEB72FHD/","label":"lists.fedoraproject.org/archives/…","hostname":"lists.fedoraproject.org","tags":["Vendor Advisory","Advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/12/msg00025.html","label":"lists.debian.org/debian-lts-announce/2022/12/msg00025.html","hostname":"lists.debian.org","tags":["Mailing List","ARTICLE","Third Party Advisory"]},{"url":"https://security.gentoo.org/glsa/202312-15","label":"security.gentoo.org/glsa/202312-15","hostname":"security.gentoo.org","tags":["Vendor Advisory","Advisory"]},{"url":"https://security.alpinelinux.org/vuln/CVE-2022-39260","label":"security.alpinelinux.org/vuln/CVE-2022-39260","hostname":"security.alpinelinux.org","tags":["Advisory"]},{"url":"https://ubuntu.com/security/CVE-2022-39260","label":"ubuntu.com/security/CVE-2022-39260","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://ubuntu.com/security/notices/USN-5686-1","label":"ubuntu.com/security/notices/USN-5686-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://ubuntu.com/security/notices/USN-5686-2","label":"ubuntu.com/security/notices/USN-5686-2","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://ubuntu.com/security/notices/USN-5686-3","label":"ubuntu.com/security/notices/USN-5686-3","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-39260","label":"www.cve.org/CVERecord?id=CVE-2022-39260","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-39260","label":"security-tracker.debian.org/tracker/CVE-2022-39260","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/39xxx/CVE-2022-39260.json","label":"github.com/CVEProject/cvelistV5/tree/main/cves/2022/39xxx/CVE-2022-39260.json","hostname":"github.com","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39260","label":"nvd.nist.gov/vuln/detail/CVE-2022-39260","hostname":"nvd.nist.gov","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":["DLA-3239-1","DSA-5332-1","MGASA-2022-0396","OPENSUSE-SU-2024:12487-1","RHSA-2023:2319","RHSA-2023:2859","RHSA-2024:0407","SUSE-SU-2022:3931-1","SUSE-SU-2022:4271-1","SUSE-SU-2023:0418-1","USN-5686-1"],"duplicates":[],"related":["CGA-2Q8X-54R9-WGMP","CGA-566W-8JVQ-7QFW","OPENSUSE-SU-2024:12487-1","SUSE-SU-2022:3931-1","SUSE-SU-2022:4271-1","SUSE-SU-2023:0418-1","USN-5686-1"]},"timeline":[{"kind":"published","date":"2022-10-19T00:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-03T12:00:43.573Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":36,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T04:58:49.872Z","stale":false,"partial":false}}