8.8
HIGH
CVE-2022-39260
Git Remote Code Execution via Heap overflows in Git Shell
Description

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.

INFO

Published Date :

Oct. 19, 2022, 12:15 p.m.

Last Modified :

Dec. 27, 2023, 10:15 a.m.

Remotely Exploitable :

Yes !

Impact Score :

5.9

Exploitability Score :

2.8
Affected Products

The following products are affected by CVE-2022-39260 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Fedoraproject fedora
1 Debian debian_linux
1 Git git
1 Apple xcode
1 Git-scm git

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2022-39260 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2022-39260 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    Dec. 27, 2023

    Action Type Old Value New Value
    Added Reference GitHub, Inc. https://security.gentoo.org/glsa/202312-15 [No types assigned]
  • CVE Modified by [email protected]

    Nov. 07, 2023

    Action Type Old Value New Value
    Added Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UKFHE4KVD7EKS5J3KTDFVBEKU3CLXGVV/ [No types assigned]
    Added Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OHNO2FB55CPX47BAXMBWUBGWHO6N6ZZH/ [No types assigned]
    Added Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/C7B6JPKX5CGGLAHXJVQMIZNNEEB72FHD/ [No types assigned]
    Removed Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/UKFHE4KVD7EKS5J3KTDFVBEKU3CLXGVV/
    Removed Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/OHNO2FB55CPX47BAXMBWUBGWHO6N6ZZH/
    Removed Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/C7B6JPKX5CGGLAHXJVQMIZNNEEB72FHD/
  • Modified Analysis by [email protected]

    Feb. 16, 2023

    Action Type Old Value New Value
    Changed Reference Type https://lists.debian.org/debian-lts-announce/2022/12/msg00025.html No Types Assigned https://lists.debian.org/debian-lts-announce/2022/12/msg00025.html Mailing List, Third Party Advisory
    Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/C7B6JPKX5CGGLAHXJVQMIZNNEEB72FHD/ Mailing List, Third Party Advisory https://lists.fedoraproject.org/archives/list/[email protected]/message/C7B6JPKX5CGGLAHXJVQMIZNNEEB72FHD/ Mailing List
    Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/OHNO2FB55CPX47BAXMBWUBGWHO6N6ZZH/ Mailing List, Third Party Advisory https://lists.fedoraproject.org/archives/list/[email protected]/message/OHNO2FB55CPX47BAXMBWUBGWHO6N6ZZH/ Mailing List
    Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/UKFHE4KVD7EKS5J3KTDFVBEKU3CLXGVV/ Mailing List, Third Party Advisory https://lists.fedoraproject.org/archives/list/[email protected]/message/UKFHE4KVD7EKS5J3KTDFVBEKU3CLXGVV/ Mailing List
    Added CPE Configuration OR *cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
  • CVE Modified by [email protected]

    Dec. 14, 2022

    Action Type Old Value New Value
    Added Reference https://lists.debian.org/debian-lts-announce/2022/12/msg00025.html [No Types Assigned]
  • Modified Analysis by [email protected]

    Nov. 16, 2022

    Action Type Old Value New Value
    Changed Reference Type http://seclists.org/fulldisclosure/2022/Nov/1 No Types Assigned http://seclists.org/fulldisclosure/2022/Nov/1 Mailing List, Third Party Advisory
    Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/C7B6JPKX5CGGLAHXJVQMIZNNEEB72FHD/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/C7B6JPKX5CGGLAHXJVQMIZNNEEB72FHD/ Mailing List, Third Party Advisory
    Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/OHNO2FB55CPX47BAXMBWUBGWHO6N6ZZH/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/OHNO2FB55CPX47BAXMBWUBGWHO6N6ZZH/ Mailing List, Third Party Advisory
    Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/UKFHE4KVD7EKS5J3KTDFVBEKU3CLXGVV/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/UKFHE4KVD7EKS5J3KTDFVBEKU3CLXGVV/ Mailing List, Third Party Advisory
    Changed Reference Type https://support.apple.com/kb/HT213496 No Types Assigned https://support.apple.com/kb/HT213496 Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* *cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* *cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*
    Added CPE Configuration OR *cpe:2.3:a:apple:xcode:*:*:*:*:*:*:*:* versions up to (excluding) 14.1
  • CVE Modified by [email protected]

    Nov. 14, 2022

    Action Type Old Value New Value
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/C7B6JPKX5CGGLAHXJVQMIZNNEEB72FHD/ [No Types Assigned]
  • CVE Modified by [email protected]

    Nov. 08, 2022

    Action Type Old Value New Value
    Added Reference http://seclists.org/fulldisclosure/2022/Nov/1 [No Types Assigned]
  • CVE Modified by [email protected]

    Nov. 02, 2022

    Action Type Old Value New Value
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/OHNO2FB55CPX47BAXMBWUBGWHO6N6ZZH/ [No Types Assigned]
  • CVE Modified by [email protected]

    Nov. 01, 2022

    Action Type Old Value New Value
    Added Reference https://support.apple.com/kb/HT213496 [No Types Assigned]
  • CVE Modified by [email protected]

    Oct. 28, 2022

    Action Type Old Value New Value
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/UKFHE4KVD7EKS5J3KTDFVBEKU3CLXGVV/ [No Types Assigned]
  • Initial Analysis by [email protected]

    Oct. 21, 2022

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
    Changed Reference Type https://github.com/git/git/security/advisories/GHSA-rjr6-wcq6-83p6 No Types Assigned https://github.com/git/git/security/advisories/GHSA-rjr6-wcq6-83p6 Mitigation, Third Party Advisory
    Added CWE NIST CWE-787
    Added CPE Configuration OR *cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* versions up to (excluding) 2.30.6 *cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* versions from (including) 2.31.0 up to (excluding) 2.31.5 *cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* versions from (including) 2.32.0 up to (excluding) 2.32.4 *cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* versions from (including) 2.33.0 up to (excluding) 2.33.5 *cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* versions from (including) 2.34.0 up to (excluding) 2.34.5 *cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* versions from (including) 2.35.0 up to (excluding) 2.35.5 *cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* versions from (including) 2.36.0 up to (excluding) 2.36.3 *cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* versions from (including) 2.37.0 up to (excluding) 2.37.4 *cpe:2.3:a:git-scm:git:2.38.0:*:*:*:*:*:*:*
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2022-39260 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2022-39260 weaknesses.

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

1.09 }} 0.17%

score

0.84354

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability