CVE-2022-39260: Git vulnerable to Remote Code Execution via Heap overflow in `git shell`
Vulnerability summary
CVE-2022-39260 is a high (CVSS 8.8) Heap-based Buffer Overflow vulnerability in apple xcode. EPSS estimates a 3.96% chance of exploitation in the next 30 days, higher than 90.7% of scored vulnerabilities.
Not severe (CVSS 8.5, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 11 · Related 7Timeline
- 19-10-2022PublishedVulnerability first disclosed.
- 03-08-2024Last modifiedVulnerability information updated.
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.
CVSS metrics
7 scores · 7 sources · 1 version- CVE.orgCNA8.5HighCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:HDiffers
- OSV · AlpineEcosystem advisory · calculated8.8HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- OSV · UbuntuEcosystem advisory · calculated8.5HighCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:HDiffers
- OSV · DebianEcosystem advisory · calculated8.8HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- OSV · WolfiEcosystem advisory · calculated8.5HighCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:HDiffers
- OSV · ChainguardEcosystem advisory · calculated8.5HighCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:HDiffers
EPSS trend
Probability
3.96%
Chance of exploitation in the next 30 days
Percentile
91%
Versus all other CVEs
30-day change
Decrease -0.03 pp
From 3.99% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Debian2 products
- git< 1:2.38.1-1
- debian_linuxEOL10.0
Alpine1 product
- git≥ 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 | < 2.30.6-r0 | ≥ 2.32.0, < 2.32.4-r0 | ≥ 2.34.0, < 2.34.5-r0 | ≥ 2.36.0, < 2.36.3-r0 | ≥ 2.37.0, < 2.38.1-r0
Apple1 product
- xcode< 14.1
Chainguard1 product
- git< 2.38.1-r0
Fedoraproject1 product
- fedoraEOL35 | 36 | 37
Git1 product
- git< 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
Git-scm1 product
- git< 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
Ubuntu1 product
- git< 1:2.7.4-0ubuntu1.10+esm3 | < 1:2.17.1-1ubuntu0.13 | < 1:2.25.1-1ubuntu3.6 | < 1:2.34.1-1ubuntu1.5
Wolfi1 product
- git< 2.38.1-r0
9 vendors · 10 products