CVE-2022-39260

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.
References
Link Resource
http://seclists.org/fulldisclosure/2022/Nov/1 Mailing List Third Party Advisory
https://github.com/git/git/security/advisories/GHSA-rjr6-wcq6-83p6 Mitigation Third Party Advisory
https://lists.debian.org/debian-lts-announce/2022/12/msg00025.html Mailing List Third Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/C7B6JPKX5CGGLAHXJVQMIZNNEEB72FHD/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OHNO2FB55CPX47BAXMBWUBGWHO6N6ZZH/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UKFHE4KVD7EKS5J3KTDFVBEKU3CLXGVV/
https://security.gentoo.org/glsa/202312-15
https://support.apple.com/kb/HT213496 Third Party Advisory
http://seclists.org/fulldisclosure/2022/Nov/1 Mailing List Third Party Advisory
https://github.com/git/git/security/advisories/GHSA-rjr6-wcq6-83p6 Mitigation Third Party Advisory
https://lists.debian.org/debian-lts-announce/2022/12/msg00025.html Mailing List Third Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/C7B6JPKX5CGGLAHXJVQMIZNNEEB72FHD/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OHNO2FB55CPX47BAXMBWUBGWHO6N6ZZH/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UKFHE4KVD7EKS5J3KTDFVBEKU3CLXGVV/
https://security.gentoo.org/glsa/202312-15
https://support.apple.com/kb/HT213496 Third Party Advisory
Configurations

Configuration 1 (hide)

OR cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
cpe:2.3:a:git-scm:git:2.38.0:*:*:*:*:*:*:*

Configuration 2 (hide)

OR cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*
cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*

Configuration 3 (hide)

cpe:2.3:a:apple:xcode:*:*:*:*:*:*:*:*

Configuration 4 (hide)

cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*

History

21 Nov 2024, 07:17

Type Values Removed Values Added
CVSS v2 : unknown
v3 : 8.8
v2 : unknown
v3 : 8.5
References () http://seclists.org/fulldisclosure/2022/Nov/1 - Mailing List, Third Party Advisory () http://seclists.org/fulldisclosure/2022/Nov/1 - Mailing List, Third Party Advisory
References () https://github.com/git/git/security/advisories/GHSA-rjr6-wcq6-83p6 - Mitigation, Third Party Advisory () https://github.com/git/git/security/advisories/GHSA-rjr6-wcq6-83p6 - Mitigation, Third Party Advisory
References () https://lists.debian.org/debian-lts-announce/2022/12/msg00025.html - Mailing List, Third Party Advisory () https://lists.debian.org/debian-lts-announce/2022/12/msg00025.html - Mailing List, Third Party Advisory
References () https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/C7B6JPKX5CGGLAHXJVQMIZNNEEB72FHD/ - () https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/C7B6JPKX5CGGLAHXJVQMIZNNEEB72FHD/ -
References () https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OHNO2FB55CPX47BAXMBWUBGWHO6N6ZZH/ - () https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OHNO2FB55CPX47BAXMBWUBGWHO6N6ZZH/ -
References () https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UKFHE4KVD7EKS5J3KTDFVBEKU3CLXGVV/ - () https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UKFHE4KVD7EKS5J3KTDFVBEKU3CLXGVV/ -
References () https://security.gentoo.org/glsa/202312-15 - () https://security.gentoo.org/glsa/202312-15 -
References () https://support.apple.com/kb/HT213496 - Third Party Advisory () https://support.apple.com/kb/HT213496 - Third Party Advisory

27 Dec 2023, 10:15

Type Values Removed Values Added
CPE cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
References
  • {'url': 'https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UKFHE4KVD7EKS5J3KTDFVBEKU3CLXGVV/', 'name': 'FEDORA-2022-8b58806840', 'tags': ['Mailing List', 'Third Party Advisory'], 'refsource': 'FEDORA'}
  • {'url': 'https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OHNO2FB55CPX47BAXMBWUBGWHO6N6ZZH/', 'name': 'FEDORA-2022-53aadd995f', 'tags': ['Mailing List', 'Third Party Advisory'], 'refsource': 'FEDORA'}
  • {'url': 'https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/C7B6JPKX5CGGLAHXJVQMIZNNEEB72FHD/', 'name': 'FEDORA-2022-fb088df94c', 'tags': ['Mailing List', 'Third Party Advisory'], 'refsource': 'FEDORA'}
  • () https://security.gentoo.org/glsa/202312-15 -
  • () https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OHNO2FB55CPX47BAXMBWUBGWHO6N6ZZH/ -
  • () https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/C7B6JPKX5CGGLAHXJVQMIZNNEEB72FHD/ -
  • () https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UKFHE4KVD7EKS5J3KTDFVBEKU3CLXGVV/ -
References (MLIST) https://lists.debian.org/debian-lts-announce/2022/12/msg00025.html - (MLIST) https://lists.debian.org/debian-lts-announce/2022/12/msg00025.html - Mailing List, Third Party Advisory

14 Dec 2022, 01:15

Type Values Removed Values Added
CWE CWE-122
References
  • (FEDORA) https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/C7B6JPKX5CGGLAHXJVQMIZNNEEB72FHD/ - Mailing List, Third Party Advisory
  • (MLIST) https://lists.debian.org/debian-lts-announce/2022/12/msg00025.html -
References (FEDORA) https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UKFHE4KVD7EKS5J3KTDFVBEKU3CLXGVV/ - (FEDORA) https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UKFHE4KVD7EKS5J3KTDFVBEKU3CLXGVV/ - Mailing List, Third Party Advisory
References (CONFIRM) https://support.apple.com/kb/HT213496 - (CONFIRM) https://support.apple.com/kb/HT213496 - Third Party Advisory
References (FEDORA) https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OHNO2FB55CPX47BAXMBWUBGWHO6N6ZZH/ - (FEDORA) https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OHNO2FB55CPX47BAXMBWUBGWHO6N6ZZH/ - Mailing List, Third Party Advisory
References (FULLDISC) http://seclists.org/fulldisclosure/2022/Nov/1 - (FULLDISC) http://seclists.org/fulldisclosure/2022/Nov/1 - Mailing List, Third Party Advisory
CPE cpe:2.3:a:apple:xcode:*:*:*:*:*:*:*:*
cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*
cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*

08 Nov 2022, 05:15

Type Values Removed Values Added
References
  • (FULLDISC) http://seclists.org/fulldisclosure/2022/Nov/1 -

02 Nov 2022, 18:15

Type Values Removed Values Added
References
  • (CONFIRM) https://support.apple.com/kb/HT213496 -
  • (FEDORA) https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OHNO2FB55CPX47BAXMBWUBGWHO6N6ZZH/ -

28 Oct 2022, 13:15

Type Values Removed Values Added
References
  • (FEDORA) https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UKFHE4KVD7EKS5J3KTDFVBEKU3CLXGVV/ -

21 Oct 2022, 18:26

Type Values Removed Values Added
References (CONFIRM) https://github.com/git/git/security/advisories/GHSA-rjr6-wcq6-83p6 - (CONFIRM) https://github.com/git/git/security/advisories/GHSA-rjr6-wcq6-83p6 - Mitigation, Third Party Advisory
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 8.8
CWE CWE-787
CPE cpe:2.3:a:git-scm:git:2.38.0:*:*:*:*:*:*:*
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*

19 Oct 2022, 12:43

Type Values Removed Values Added
New CVE

Information

Published : 2022-10-19 12:15

Updated : 2024-11-21 07:17


NVD link : CVE-2022-39260

Mitre link : CVE-2022-39260

CVE.ORG link : CVE-2022-39260


JSON object : View

Products Affected

debian

  • debian_linux

git-scm

  • git

apple

  • xcode

fedoraproject

  • fedora
CWE
CWE-122

Heap-based Buffer Overflow

CWE-787

Out-of-bounds Write