CVE-2022-39260: apple xcode Heap-based Buffer Overflow
Vulnerability summary
CVE-2022-39260 is a high (CVSS 8.8) Heap-based Buffer Overflow vulnerability in apple xcode. EPSS estimates a 3.99% chance of exploitation in the next 30 days, higher than 90.3% of scored vulnerabilities.
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.99%
Chance of exploitation in the next 30 days
Percentile
90%
Versus all other CVEs
30-day change
+0.73 pp
From 3.26% on 18-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-122Heap-based Buffer OverflowA 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().
- CWE-787Out-of-bounds WriteThe product writes data past the end, or before the beginning, of the intended buffer.
Affected systems
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
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.17.1-1ubuntu0.13 | < 1:2.25.1-1ubuntu3.6 | < 1:2.34.1-1ubuntu1.5 | < 1:2.7.4-0ubuntu1.10+esm3
Wolfi1 product
- git< 2.38.1-r0
9 vendors · 10 products