8.8

CVE-2022-39260: Git vulnerable to Remote Code Execution via Heap overflow in `git shell`

Modified
AliasesALPINE-CVE-2022-39260UBUNTU-CVE-2022-39260USN-5686-2
Published 19-10-2022Last modified 03-08-2024

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.

Priority
Routine

Not severe (CVSS 8.5, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
8.8/10
010
High · v3.1 (NVD)
EPSS score
3.96%
0%100%
Low · -0.03 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 11 · Related 7

Timeline

  1. 19-10-2022
    PublishedVulnerability first disclosed.
  2. 03-08-2024
    Last 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

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

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.

Debian2 products
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
Chainguard1 product
  • git< 2.38.1-r0
Fedoraproject1 product
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

References

17 links
Show all 17 references