Read the docs
TI-2022-08579 Aliases CVE-2022-24765

Uncontrolled search for the Git directory in Git for Windows

Priority LOW 38CWE-427Published · Updated

Key facts

Attack vector
Local
Privileges required
Low
User interaction
None
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-427.

Summary

Git for Windows is a fork of Git containing Windows-specific patches. This vulnerability affects users working on multi-user machines, where untrusted parties have write access to the same hard disk. Those untrusted parties could create the folder `C:\.git`, which would be picked up by Git operations run supposedly outside a repository while searching for a Git directory. Git would then respect any config in said Git directory. Git Bash users who set `GIT_PS1_SHOWDIRTYSTATE` are vulnerable as well. Users who installed posh-gitare vulnerable simply by starting a PowerShell. Users of IDEs such as Visual Studio are vulnerable: simply creating a new project would already read and respect the config specified in `C:\.git\config`. Users of the Microsoft fork of Git are vulnerable simply by starting a Git Bash. The problem has been patched in Git for Windows v2.35.2. Users unable to upgrade may create the folder `.git` on all drives where Git commands are run, and remove read/write access from those folders as a workaround. Alternatively, define or extend `GIT_CEILING_DIRECTORIES` to cover the _parent_ directory of the user profile, e.g. `C:\Users` if the user profile is located in `C:\Users\my-user-name`.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.0101 63rd percentileScored 2026-11-07
Fix Partial git (git-for-windows): 2.35.2Red Hat: 3 advisoriesRed Hat: 3 fixed, 3 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
git-for-windowsgitbefore 2.35.22.35.2Patch availableCNA
  • git Vendorgit-for-windows Affected before 2.35.2 Fixed in 2.35.2 Patch available CNA

CPE configurations NVD · 8

CPEVersionsRoleVendor
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*before 2.35.2VulnerableGit-scm
cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*not specified by NVDRunning onMicrosoft
cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*34VulnerableFedoraproject
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 13.4VulnerableApple
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*10.0VulnerableDebian
  • cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* Versions before 2.35.2 Vulnerable ·Git-scm
  • cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:* Versions not specified by NVD Running on ·Microsoft
  • cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* Versions 34 Vulnerable ·Fedoraproject
  • 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 13.4 Vulnerable ·Apple
  • cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* Versions 10.0 Vulnerable ·Debian

Remediation

  • Fix · CNA git (git-for-windows) Fixed in 2.35.2

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

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-24765

References

  • TI-2026-44986 Git for Windows: Server-advertised bundle-uri can trigger outbound SMB callbacks via UNC and file:// paths on Windows CVSS 3.1HIGH 7.4
  • TI-2025-40849 Git for Windows leaks NTLM hash when cloning from an attacker-controlled server CVSS 3.1HIGH 7.4
  • TI-2018-07996 In Git before 2.13.7, 2.14.x before 2.14.4, 2.15.x before 2.15.2, 2.16.x before 2.16.4… CVSS 3.0HIGH 7.8
  • TI-2026-85080 Out-of-bounds write in Git for Windows credential helper CVSS 3.1MEDIUM 4.4
  • TI-2022-20294 Git clone remote code execution vulnerability in git-for-windows CVSS 3.1HIGH 8.6
  • TI-2023-09447 gitk can inadvertently call executables in the worktree CVSS 3.1HIGH 8.6
See all 14 →

Sources