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 Details
- CVSS 3.1 Base Score: 8.5
- CVSS 3.1 Vector: (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Alma_linux | — | Upgrade git-allUpgrade git-core-docUpgrade gitwebUpgrade gitkUpgrade gitUpgrade git-subtreeUpgrade git-coreUpgrade git-daemonUpgrade git-instawebUpgrade perl-Git-SVNUpgrade git-guiUpgrade perl-GitUpgrade git-emailUpgrade git-credential-libsecretUpgrade git-svn | May 15, 2023 | Oct 19, 2022 |
| Alpine Linux | — | Upgrade git | Mar 26, 2024 | Oct 19, 2022 |
| Amazon Linux Ami 2 | — | Upgrade git-guiUpgrade git-instawebUpgrade git-svnUpgrade git-emailUpgrade git-daemonUpgrade git-p4Upgrade git-allUpgrade git-debuginfoUpgrade perl-GitUpgrade git-core-docUpgrade gitwebUpgrade git-coreUpgrade gitUpgrade git-subtreeUpgrade git-credential-libsecretUpgrade gitkUpgrade perl-Git-SVNUpgrade git-cvs | Dec 7, 2022 | Oct 19, 2022 |
| Amazon_linux | — | Upgrade git | Dec 10, 2022 | Oct 18, 2022 |
| Amazon_linux_2023 | — | Upgrade git-core-docUpgrade git-allUpgrade perl-GitUpgrade gitUpgrade gitkUpgrade git-credential-libsecretUpgrade git-debugsourceUpgrade git-daemon-debuginfoUpgrade git-svnUpgrade gitwebUpgrade git-coreUpgrade git-cvsUpgrade git-core-debuginfoUpgrade git-credential-libsecret-debuginfoUpgrade git-subtreeUpgrade git-guiUpgrade git-emailUpgrade git-debuginfoUpgrade git-p4Upgrade git-daemonUpgrade perl-Git-SVNUpgrade git-instaweb | Feb 17, 2025 | Oct 18, 2022 |
| Centos_linux | — | Upgrade git-coreUpgrade git-core-debuginfoUpgrade perl-Git-SVNUpgrade git-credential-libsecret-debuginfoUpgrade git-subtreeUpgrade gitUpgrade git-credential-libsecretUpgrade git-daemonUpgrade git-svnUpgrade git-debuginfoUpgrade git-emailUpgrade perl-GitUpgrade git-guiUpgrade git-daemon-debuginfoUpgrade gitkUpgrade git-allUpgrade git-debugsourceUpgrade git-instawebUpgrade git-core-docUpgrade gitweb | May 15, 2023 | Oct 19, 2022 |
| Debian | — | Upgrade git | Dec 15, 2022 | Oct 19, 2022 |
| Freebsd | — | Upgrade gitUpgrade git-tinyUpgrade git-lite | Nov 4, 2022 | Oct 18, 2022 |
| Gentoo Linux | — | Upgrade dev-vcs/git. | Dec 28, 2023 | Oct 19, 2022 |
| Huawei Euleros 2_0_sp10 | — | Upgrade gitUpgrade git-help | Feb 13, 2023 | Oct 19, 2022 |
| Huawei Euleros 2_0_sp11 | — | Upgrade git-helpUpgrade git | Jan 6, 2023 | Oct 19, 2022 |
| Huawei Euleros 2_0_sp5 | — | Upgrade git-core-docUpgrade gitUpgrade git-core | Mar 9, 2023 | Oct 19, 2022 |
| Huawei Euleros 2_0_sp8 | — | Upgrade git-core-docUpgrade git-coreUpgrade git | Feb 9, 2023 | Oct 19, 2022 |
| Huawei Euleros 2_0_sp9 | — | Upgrade git-helpUpgrade git | Jan 9, 2023 | Oct 19, 2022 |
| Oracle_linux | — | Upgrade git-allUpgrade git-subtreeUpgrade git-credential-libsecretUpgrade git-core-docUpgrade gitUpgrade git-emailUpgrade perl-Git-SVNUpgrade git-svnUpgrade git-daemonUpgrade gitwebUpgrade gitkUpgrade git-instawebUpgrade git-coreUpgrade perl-GitUpgrade git-gui | Jul 22, 2024 | Oct 18, 2022 |
| Redhat_linux | — | Upgrade git-credential-libsecret-debuginfoUpgrade perl-GitUpgrade git-core-docUpgrade git-core-debuginfoUpgrade git-allUpgrade gitwebUpgrade gitkUpgrade gitUpgrade git-debuginfoUpgrade git-debugsourceUpgrade git-instawebUpgrade git-subtreeUpgrade git-guiUpgrade git-daemonUpgrade git-svnUpgrade git-emailUpgrade git-credential-libsecretNo solution existsUpgrade perl-Git-SVNUpgrade git-coreUpgrade git-daemon-debuginfo | May 15, 2023 | Oct 19, 2022 |
| Suse | — | Upgrade perl-GitUpgrade git-guiUpgrade git-daemonUpgrade git-cvsUpgrade gitkUpgrade git-emailUpgrade git-p4Upgrade git-docUpgrade git-svnUpgrade git-credential-libsecretUpgrade git-archUpgrade git-credential-gnome-keyringUpgrade git-webUpgrade gitUpgrade git-core | Nov 11, 2022 | Oct 19, 2022 |
| Ubuntu | — | Upgrade git (Ubuntu Pro)Upgrade git | Oct 19, 2022 | Oct 18, 2022 |
| Vmware Photon_os | — | Use 'tdnf update' to upgrade all packages to the latest version. | Jan 20, 2025 | Oct 19, 2022 |
Prioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub