
CVE catalog
CVE-2022-39260
git: CVE-2022-39260
- Severity
- High · CVSS 8.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 3.99% · Oct 27, 2026
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.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | git | sid | 1:2.55.0-1 | fixed |
| Debian | git | forky | 1:2.53.0-1 | fixed |
| Debian | git | trixie | 1:2.47.3-0+deb13u1 | fixed |
| Debian | git | bookworm | 1:2.39.5-0+deb12u3 | fixed |
| Debian | git | bookworm-security | 1:2.39.5-0+deb12u2 | fixed |
| Ubuntu | git | pro | 1:2.5.0-1 | vulnerable |
| Ubuntu | git | pro | 1:2.6.2-1 | vulnerable |
| Ubuntu | git | pro | 1:2.6.3-1 | vulnerable |
| Ubuntu | git | pro | 1:2.6.4-1 | vulnerable |
| Ubuntu | git | pro | 1:2.7.0~rc3-1 | vulnerable |
| Ubuntu | git | pro | 1:2.7.0-1 | vulnerable |
| Ubuntu | git | pro | 1:2.7.3-0ubuntu1 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.1 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.2 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.3 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.4 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.5 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.6 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.7 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.8 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.9 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.10 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.10+esm1 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.10+esm3 | fixed |
| Ubuntu | git | pro | 1:2.5.0-1 | vulnerable |
| Ubuntu | git | pro | 1:2.6.2-1 | vulnerable |
| Ubuntu | git | pro | 1:2.6.3-1 | vulnerable |
| Ubuntu | git | pro | 1:2.6.4-1 | vulnerable |
| Ubuntu | git | pro | 1:2.7.0~rc3-1 | vulnerable |
| Ubuntu | git | pro | 1:2.7.0-1 | vulnerable |
| Ubuntu | git | pro | 1:2.7.3-0ubuntu1 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.1 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.2 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.3 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.4 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.5 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.6 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.7 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.8 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.9 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.10 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.10+esm1 | vulnerable |
| Ubuntu | git | pro | 1:2.7.4-0ubuntu1.10+esm3 | fixed |
| Ubuntu | git | 18.04 | 1:2.14.1-1ubuntu4 | vulnerable |
| Ubuntu | git | 18.04 | 1:2.15.1-1ubuntu2 | vulnerable |
| Ubuntu | git | 18.04 | 1:2.17.0-1ubuntu1 | vulnerable |
| Ubuntu | git | 18.04 | 1:2.17.1-1ubuntu0.1 | vulnerable |
| Ubuntu | git | 18.04 | 1:2.17.1-1ubuntu0.3 | vulnerable |
| Ubuntu | git | 18.04 | 1:2.17.1-1ubuntu0.4 | vulnerable |
| Ubuntu | git | 18.04 | 1:2.17.1-1ubuntu0.5 | vulnerable |
| Ubuntu | git | 18.04 | 1:2.17.1-1ubuntu0.6 | vulnerable |
| Ubuntu | git | 18.04 | 1:2.17.1-1ubuntu0.7 | vulnerable |
| Ubuntu | git | 18.04 | 1:2.17.1-1ubuntu0.8 | vulnerable |
| Ubuntu | git | 18.04 | 1:2.17.1-1ubuntu0.9 | vulnerable |
| Ubuntu | git | 18.04 | 1:2.17.1-1ubuntu0.10 | vulnerable |
| Ubuntu | git | 18.04 | 1:2.17.1-1ubuntu0.11 | vulnerable |
| Ubuntu | git | 18.04 | 1:2.17.1-1ubuntu0.12 | vulnerable |
| Ubuntu | git | 18.04 | 1:2.17.1-1ubuntu0.13 | fixed |
| Ubuntu | git | 20.04 | 1:2.20.1-2ubuntu1 | vulnerable |
| Ubuntu | git | 20.04 | 1:2.24.0-1ubuntu1 | vulnerable |
| Ubuntu | git | 20.04 | 1:2.24.0-1ubuntu2 | vulnerable |
| Ubuntu | git | 20.04 | 1:2.25.0-1ubuntu1 | vulnerable |
| Ubuntu | git | 20.04 | 1:2.25.1-1ubuntu1 | vulnerable |
| Ubuntu | git | 20.04 | 1:2.25.1-1ubuntu2 | vulnerable |
| Ubuntu | git | 20.04 | 1:2.25.1-1ubuntu3 | vulnerable |
| Ubuntu | git | 20.04 | 1:2.25.1-1ubuntu3.1 | vulnerable |
| Ubuntu | git | 20.04 | 1:2.25.1-1ubuntu3.2 | vulnerable |
| Ubuntu | git | 20.04 | 1:2.25.1-1ubuntu3.3 | vulnerable |
| Ubuntu | git | 20.04 | 1:2.25.1-1ubuntu3.4 | vulnerable |
| Ubuntu | git | 20.04 | 1:2.25.1-1ubuntu3.5 | vulnerable |
| Ubuntu | git | 20.04 | 1:2.25.1-1ubuntu3.6 | fixed |
| Ubuntu | git | 22.04 | 1:2.32.0-1ubuntu1 | vulnerable |
| Ubuntu | git | 22.04 | 1:2.33.1-1ubuntu1 | vulnerable |
| Ubuntu | git | 22.04 | 1:2.34.1-1ubuntu1 | vulnerable |
| Ubuntu | git | 22.04 | 1:2.34.1-1ubuntu1.1 | vulnerable |
| Ubuntu | git | 22.04 | 1:2.34.1-1ubuntu1.2 | vulnerable |
| Ubuntu | git | 22.04 | 1:2.34.1-1ubuntu1.4 | vulnerable |
| Ubuntu | git | 22.04 | 1:2.34.1-1ubuntu1.5 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | git | source | sid | 1:2.38.1-1 | not yet assigned | Not reported | [1022046] |
| Debian | git | source | forky | 1:2.38.1-1 | not yet assigned | Not reported | [1022046] |
| Debian | git | source | trixie | 1:2.38.1-1 | not yet assigned | Not reported | [1022046] |
| Debian | git | source | bookworm | 1:2.38.1-1 | not yet assigned | Not reported | [1022046] |
| Ubuntu | git | deb | pro | 1:2.7.4-0ubuntu1.10+esm3 | Not reported | USN-5686-2 | Not reported |
| Ubuntu | git | deb | pro | 1:2.7.4-0ubuntu1.10+esm3 | Not reported | UBUNTU-CVE-2022-39260 | Not reported |
| Ubuntu | git | deb | 18.04 | 1:2.17.1-1ubuntu0.13 | Not reported | UBUNTU-CVE-2022-39260 | Not reported |
| Ubuntu | git | deb | 20.04 | 1:2.25.1-1ubuntu3.6 | Not reported | UBUNTU-CVE-2022-39260 | Not reported |
| Ubuntu | git | deb | 22.04 | 1:2.34.1-1ubuntu1.5 | Not reported | UBUNTU-CVE-2022-39260 | Not reported |
OpenFactory catalog packages
[Debian 12 (Bookworm)]
- [git]Fixed
Details (4)
1:2.39.5-0+deb12u3· amd64 · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u3· arm64 · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· amd64 · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· arm64 · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
- [git-all]Fixed
Source package: [git]
Details (4)
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
- [git-cvs]Fixed
Source package: [git]
Details (4)
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
- [git-daemon-run]Fixed
Source package: [git]
Details (4)
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
- [git-daemon-sysvinit]Fixed
Source package: [git]
Details (4)
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
- [git-doc]Fixed
Source package: [git]
Details (4)
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
- [git-email]Fixed
Source package: [git]
Details (4)
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
- [git-gui]Fixed
Source package: [git]
Details (4)
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
- [gitk]Fixed
Source package: [git]
Details (4)
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
- [git-man]Fixed
Source package: [git]
Details (4)
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
- [git-mediawiki]Fixed
Source package: [git]
Details (4)
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
- [git-svn]Fixed
Source package: [git]
Details (4)
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
- [gitweb]Fixed
Source package: [git]
Details (4)
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u3· all · bookwormFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
1:2.39.5-0+deb12u2· all · bookworm-securityFixed · Fixed:
1:2.38.1-1dsa · git · debian · bookworm
Observed:
References
- [https://cert-portal.siemens.com/productcert/csaf/ssa-806742.json]
- [https://ftp.suse.com/pub/projects/security/csaf/rhsa-2023_2859.json]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2022-39260]
- [https://osv.dev/vulnerability/USN-5686-2]
- [https://security-tracker.debian.org/tracker/CVE-2022-39260]
- [https://security.access.redhat.com/data/csaf/v2/vex/2022/cve-2022-39260.json]
- [https://wid.cert-bund.de/.well-known/csaf/white/2022/wid-sec-w-2022-1790.json]
[CERT-Bund public advisories] · [CISA cybersecurity advisories] · [Debian Security Tracker] · [FIRST EPSS] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX] · [SUSE security advisories and VEX]