Read the docs
TI-2022-18636 Aliases CVE-2022-39260

Git vulnerable to Remote Code Execution via Heap overflow in `git shell`

Priority MEDIUM 45CWE-122Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Partial Red Hat: 3 fixed, 3 without a fix

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat. Impact type from CWE-122 and the CVSS impact.

Summary

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.

Why it matters now

EPSS 0.03987 90th percentileScored 2026-11-07
Fix Partial git (git): 2.30.6Red Hat: 3 advisoriesRed Hat: 3 fixed, 3 without a fix

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
Gitgitbefore 2.30.6; > 2.31.0, < 2.31.5; > 2.32.0, < 2.32.4; > 2.33.0, < 2.33.5; > 2.34.0, < 2.34.5; > 2.34.0, < 2.35.5; > 2.35.0, < 2.36.3; > 2.37.0, < 2.37.42.30.6Patch availableCNA
  • git VendorGit Affected before 2.30.6; > 2.31.0, < 2.31.5; > 2.32.0, < 2.32.4; > 2.33.0, < 2.33.5; > 2.34.0, < 2.34.5; > 2.34.0, < 2.35.5; > 2.35.0, < 2.36.3; > 2.37.0, < 2.37.4 Fixed in 2.30.6 Patch available CNA

CPE configurations NVD · 7

CPEVersionsRoleVendor
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*before 2.30.6; 2.31.0 to before 2.31.5; 2.32.0 to before 2.32.4; 2.33.0 to before 2.33.5; 2.34.0 to before 2.34.5; 2.35.0 to before 2.35.5; 2.36.0 to before 2.36.3; 2.37.0 to before 2.37.4VulnerableGit-scm
cpe:2.3:a:git-scm:git:2.38.0:*:*:*:*:*:*:*2.38.0VulnerableGit-scm
cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*35VulnerableFedoraproject
cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*36VulnerableFedoraproject
cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*37VulnerableFedoraproject
cpe:2.3:a:apple:xcode:*:*:*:*:*:*:*:*before 14.1VulnerableApple
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*10.0VulnerableDebian
  • cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* Versions before 2.30.6; 2.31.0 to before 2.31.5; 2.32.0 to before 2.32.4; 2.33.0 to before 2.33.5; 2.34.0 to before 2.34.5; 2.35.0 to before 2.35.5; 2.36.0 to before 2.36.3; 2.37.0 to before 2.37.4 Vulnerable ·Git-scm
  • cpe:2.3:a:git-scm:git:2.38.0:*:*:*:*:*:*:* Versions 2.38.0 Vulnerable ·Git-scm
  • cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* Versions 35 Vulnerable ·Fedoraproject
  • cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* Versions 36 Vulnerable ·Fedoraproject
  • cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:* Versions 37 Vulnerable ·Fedoraproject
  • cpe:2.3:a:apple:xcode:*:*:*:*:*:*:*:* Versions before 14.1 Vulnerable ·Apple
  • cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* Versions 10.0 Vulnerable ·Debian

Remediation

  • Fix · CNA git (git) Fixed in 2.30.6

Red Hat 3 advisories

  • RHSA-2024:0407 Released 2024-01-25 · Red Hat rating Moderate
    git security update
    • Red Hat Enterprise Linux AppStream EUS (v.8.6) git-2.31.8-1.el8_6, git-all-2.31.8-1.el8_6, git-core-2.31.8-1.el8_6 +12
  • RHSA-2023:2859 Released 2023-05-16 · Red Hat rating Moderate
    git security and bug fix update
    • Red Hat Enterprise Linux AppStream (v. 8) git-2.39.1-1.el8, git-all-2.39.1-1.el8, git-core-2.39.1-1.el8 +12
  • RHSA-2023:2319 Released 2023-05-09 · Red Hat rating Moderate
    git security and bug fix update
    • Red Hat Enterprise Linux AppStream (v. 9) git-2.39.1-1.el9, git-all-2.39.1-1.el9, git-core-2.39.1-1.el9 +12

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Advisory ·

    git — FEDORA-2022-fb088df94c

    2 records Highest priority Priority MEDIUM 1 MEDIUM, 1 LOW

    Other records, highest priority first

    • TI-2022-18629 Git subject to exposure of sensitive information via local clone of symbolic linksPriority LOW 28
  • Advisory ·

    git — FEDORA-2022-53aadd995f

    2 records Highest priority Priority MEDIUM 1 MEDIUM, 1 LOW

    Other records, highest priority first

    • TI-2022-18629 Git subject to exposure of sensitive information via local clone of symbolic linksPriority LOW 28
Show 1 more group
  • Advisory ·

    git — FEDORA-2022-8b58806840

    2 records Highest priority Priority MEDIUM 1 MEDIUM, 1 LOW

    Other records, highest priority first

    • TI-2022-18629 Git subject to exposure of sensitive information via local clone of symbolic linksPriority LOW 28

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Enterprise Linux 6AffectedNo fix planned: Out of support scope
Red Hat Enterprise Linux 7AffectedNo fix planned: Out of support scope
Red Hat Software CollectionsAffectedNo fix planned: Will not fix
Red Hat Enterprise Linux AppStream (v. 8)Fixed RHSA-2023:2859
Red Hat Enterprise Linux AppStream (v. 9)Fixed RHSA-2023:2319
Red Hat Enterprise Linux AppStream EUS (v.8.6)Fixed RHSA-2024:0407

Timeline

  1. 2026-10-02 Threatist record created from CVE-2022-39260
  2. 2026-10-16 EPSS moved to the 90th–95th percentile

References

  • TI-2025-30709 Git allows arbitrary code execution through broken config quoting KEVCVSS 3.1HIGH 8.1
  • TI-2022-07580 gitattributes parsing integer overflow in git CVSS 3.1CRITICAL 9.8
  • TI-2022-20244 Integer overflow in `git archive`, `git log --format` leading to RCE in git CVSS 3.1CRITICAL 9.8
  • TI-2021-04400 malicious repositories can execute remote code while cloning CVSS 3.1HIGH 8.0
  • TI-2024-21101 Git's recursive clones on case-insensitive filesystems that support symlinks are susceptible to Remote Code Execution CVSS 3.1CRITICAL 9.1
  • TI-2023-10933 "git apply --reject" partially-controlled arbitrary file write CVSS 3.1HIGH 7.5
See all 31 →

Sources