1. Home
  2. Vulnerabilities
  3. CVE-2022-39260

CVE-2022-39260

Git is an open source, scalable, distributed revision control system. `git shell` is a restricted login shell…

Published 19 Oct 2022 · modified 17 Jun 2026 · Sources: NVD, EPSS (FIRST)

Medium 59/100

Summary

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.

Affected products and versions

Apple (1 line(s))
Apple
ProductVersionsFixed inSource
Xcode before 14.1 (excluded) — NVD
Debian (1 line(s))
Debian
ProductVersionsFixed inSource
Debian linux 10.0 — NVD
Fedoraproject (3 line(s))
Fedoraproject
ProductVersionsFixed inSource
Fedora 35 — NVD
Fedora 36 — NVD
Fedora 37 — NVD
Git-scm (9 line(s))
Git-scm
ProductVersionsFixed inSource
Git before 2.30.6 (excluded) — NVD
Git from 2.31.0 (included) to 2.31.5 (excluded) — NVD
Git from 2.32.0 (included) to 2.32.4 (excluded) — NVD
Git from 2.33.0 (included) to 2.33.5 (excluded) — NVD
Git from 2.34.0 (included) to 2.34.5 (excluded) — NVD
Git from 2.35.0 (included) to 2.35.5 (excluded) — NVD
Git from 2.36.0 (included) to 2.36.3 (excluded) — NVD
Git from 2.37.0 (included) to 2.37.4 (excluded) — NVD
Git 2.38.0 — NVD

Fix

Not provided by the vendor.

Workaround

No workaround provided.

Check whether you are affected

No verification method provided.

Timeline

  1. — CVE published (cve)

References

Data provenance

Status
NVD
Publication date
NVD
Description
NVD
CVSS score
NVD
Weakness (CWE)
NVD
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H (CVSS 3.1, NVD)
Weakness
CWE-787 · Corruption mémoire

How this data is obtained and calculated