CVE-2022-39260

EUVD-2022-41771
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.
ProviderTypeBase ScoreAtk. VectorAtk. ComplexityPriv. RequiredVector
NISTPrimary
8.5 HIGH
NETWORK
HIGH
LOW
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
GitHub_MCNA
8.5 HIGH
NETWORK
HIGH
LOW
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
Base Score
CVSS 3.x
EPSS Score
Percentile: 79%
Affected Products (NVD)
VendorProductVersion
git-scmgit
𝑥
< 2.30.6
git-scmgit
2.31.0 ≤
𝑥
< 2.31.5
git-scmgit
2.32.0 ≤
𝑥
< 2.32.4
git-scmgit
2.33.0 ≤
𝑥
< 2.33.5
git-scmgit
2.34.0 ≤
𝑥
< 2.34.5
git-scmgit
2.35.0 ≤
𝑥
< 2.35.5
git-scmgit
2.36.0 ≤
𝑥
< 2.36.3
git-scmgit
2.37.0 ≤
𝑥
< 2.37.4
git-scmgit
2.38.0
applexcode
𝑥
< 14.1
debiandebian_linux
10.0
𝑥
= Vulnerable software versions
Debian logo
Debian Releases
Debian Product
Codename
git
bookworm
1:2.39.2-1.1
fixed
bookworm (security)
1:2.39.5-0+deb12u1
fixed
bullseye
1:2.30.2-1+deb11u2
fixed
bullseye (security)
1:2.30.2-1+deb11u3
fixed
sid
1:2.45.2-1.1
fixed
trixie
1:2.45.2-1
fixed
Ubuntu logo
Ubuntu Releases
Ubuntu Product
Codename
git
bionic
Fixed 1:2.17.1-1ubuntu0.13
released
focal
Fixed 1:2.25.1-1ubuntu3.6
released
jammy
Fixed 1:2.34.1-1ubuntu1.5
released
kinetic
Fixed 1:2.37.2-1ubuntu1.1
released
lunar
Fixed 1:2.38.1-1ubuntu1
released
trusty
ignored
xenial
Fixed 1:2.7.4-0ubuntu1.10+esm3
released