Skip to content
TrackCVE
  • Newest CVEsPage
  • Recently added to KEVPage
  • Rising exploitation (EPSS)Page
  • Weekly digestPage
  • StatisticsPage
  • WatchlistPage
  • API documentationPage
  • MCP serverPage
  • Data sourcesPage
  • ChangelogPage
  • AboutPage
  • How it's builtPage
Back

CVE-2022-39260

Git vulnerable to Remote Code Execution via Heap overflow in `git shell`

High8.5EPSS 4.0%
Published
Updated
Reserved
Assigned by
GitHub_M

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.

Timeline

  1. ID reserved

    By GitHub_M

  2. · 47 days later

    Published

  3. · 22 months later

    Record updated

Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.

Scores

CVSS scores of CVE-2022-39260, by who scored it
Scored byCVSSScoreVector
GitHub_MCNA (assigner)3.1High8.5CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
NVDNVD · Modified3.1High8.8CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS (exploitation in 30 days)
4.0% · top 9.4% of all CVEs (7 Nov 2026)
Loading the EPSS history…

The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.5.

Weakness

Affected products

  • git · git

    • affected < 2.30.6
    • affected > 2.31.0, < 2.31.5
    • affected > 2.32.0, < 2.32.4
    • affected > 2.33.0, < 2.33.5
    • affected > 2.34.0, < 2.34.5
    • affected > 2.34.0, < 2.35.5
    • affected > 2.35.0, < 2.36.3
    • affected > 2.37.0, < 2.37.4

References (8)

Sources

The same CVE in the primary databases and aggregators, to check against.

Badge for a README or a ticket

CVE-2022-39260 badge
[![CVE-2022-39260](https://trackcve.app/badge/CVE-2022-39260.svg)](https://trackcve.app/cve/CVE-2022-39260)

Record last updated .