cve.bz

CVE-2022-39260 Out-of-bounds Write

8.8 highEPSS 4.0%

High (8.8). EPSS 4.0% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

8.8 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
4.0% (unchanged from 4.0% a week ago; 4.0% 30 days ago) estimated probability of exploitation activity in the next 30 days; 91st percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-787 Out-of-bounds Write
CWE-122 Heap-based Buffer Overflow
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-39260 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-39260?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-39260?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-39260 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
git-scm:gitbefore 2.30.6
git-scm:gitfrom 2.31.0 before 2.31.5
git-scm:gitfrom 2.32.0 before 2.32.4
git-scm:gitfrom 2.33.0 before 2.33.5
git-scm:gitfrom 2.34.0 before 2.34.5
git-scm:gitfrom 2.35.0 before 2.35.5
git-scm:gitfrom 2.36.0 before 2.36.3
git-scm:gitfrom 2.37.0 before 2.37.4
git-scm:git2.38.0
fedoraproject:fedora35
fedoraproject:fedora36
fedoraproject:fedora37
apple:xcodebefore 14.1
debian:debian_linux10.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10git1:2.20.1-2+deb10u5DLA-3239-1
Debian11git1:2.30.2-1+deb11u1DSA-5332-1
Debian12, 13, 14git1:2.38.1-1DEBIAN-CVE-2022-39260
Ubuntu18.04:LTSgit1:2.17.1-1ubuntu0.13UBUNTU-CVE-2022-39260 USN-5686-1
Ubuntu20.04:LTSgit1:2.25.1-1ubuntu3.6UBUNTU-CVE-2022-39260 USN-5686-1
Ubuntu22.04:LTSgit1:2.34.1-1ubuntu1.5UBUNTU-CVE-2022-39260 USN-5686-1
UbuntuPro:16.04:LTSgit1:2.7.4-0ubuntu1.10+esm3UBUNTU-CVE-2022-39260 USN-5686-2
Red Hatenterprise_linux:8::appstreamgit, gitk, gitweb and 17 more0:2.39.1-1.el8RHSA-2023:2859
Red Hatenterprise_linux:9::appstreamgit, gitk, gitweb and 17 more0:2.39.1-1.el9RHSA-2023:2319
Red Hatrhel_eus:8.6::appstreamgit, gitk, gitweb and 17 more0:2.31.8-1.el8_6RHSA-2024:0407
SUSEEnterprise Storage 7, Linux Enterprise High Performance Computing 15 SP1-LTSS, Linux Enterprise High Performance Computing 15 SP2-LTSS and 4 moregit2.26.2-150000.47.1SUSE-SU-2023:0418-1
SUSEHPE Helion OpenStack 8, Linux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5 and 2 moregit2.26.2-27.60.1SUSE-SU-2022:4271-1
SUSELinux Enterprise Module for Basesystem 15 SP3, Linux Enterprise Module for Basesystem 15 SP4, Linux Enterprise Module for Development Tools 15 SP3 and 1 moregit2.35.3-150300.10.18.1SUSE-SU-2022:3931-1
openSUSELeap 15.3, Leap 15.4git2.35.3-150300.10.18.1SUSE-SU-2022:3931-1
openSUSELeap 15.4git2.26.2-150000.47.1SUSE-SU-2023:0418-1
openSUSETumbleweedgit2.38.1-1.1openSUSE-SU-2024:12487-1
AlmaLinux8git, gitk, gitweb and 12 more2.39.1-1.el8ALSA-2023:2859
AlmaLinux9git, gitk, gitweb and 12 more2.39.1-1.el9ALSA-2023:2319
Alpinev3.13git2.30.6-r0ALPINE-CVE-2022-39260
Alpinev3.14git2.32.4-r0ALPINE-CVE-2022-39260
Alpinev3.15git2.34.5-r0ALPINE-CVE-2022-39260
Alpinev3.16git2.36.3-r0ALPINE-CVE-2022-39260
Alpinev3.17, v3.18, v3.19 and 5 moregit2.38.1-r0ALPINE-CVE-2022-39260

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's mitigation

Disabling `git shell` access via remote logins is a viable short-term workaround.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8git-0:2.39.1-1.el8Fixed 2023-05-16RHSA-2023:2859
Red Hat Enterprise Linux 8.6 Extended Update Supportgit-0:2.31.8-1.el8_6Fixed 2024-01-25RHSA-2024:0407
Red Hat Enterprise Linux 9git-0:2.39.1-1.el9Fixed 2023-05-09RHSA-2023:2319
Red Hat Enterprise Linux 6gitOut of support scope
Red Hat Enterprise Linux 7gitOut of support scope
Red Hat Software Collectionsrh-git227-gitWill not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-39260.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-24-046-11Siemens SCALANCE XCM-/XRM-3002024-02-13MultipleSCALANCE XCH328 (6GK5328-4TS01-2EC2), SCALANCE XCM324 (6GK5324-8TS01-2AC2), SCALANCE XCM328 (6GK5328-4TS01-2AC2) and 8 morenone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

Attack patterns (CAPEC)

  • CAPEC-92 Forced Integer Overflow Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON