CVE-2022-31012
CVE-2022-31012 is a high-severity vulnerability in Gitforwindows Git with a CVSS 3.x base score of 8.2. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-426.
Key facts
- Severity: High (CVSS 3.x base score 8.2)
- CVSS v2: 4.4
- EPSS exploit prediction: 0% (30th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-426
- Affected product: Gitforwindows Git
- Published:
- Last modified:
Description
Git for Windows is a fork of Git that contains Windows-specific patches. This vulnerability in versions prior to 2.37.1 lets Git for Windows' installer execute a binary into `C:\mingw64\bin\git.exe` by mistake. This only happens upon a fresh install, not when upgrading Git for Windows. A patch is included in version 2.37.1. Two workarounds are available. Create the `C:\mingw64` folder and remove read/write access from this folder, or disallow arbitrary authenticated users to create folders in `C:\`.
Frequently asked questions
- What is CVE-2022-31012?
- Git for Windows is a fork of Git that contains Windows-specific patches. This vulnerability in versions prior to 2.37.1 lets Git for Windows' installer execute a binary into `C:\mingw64\bin\git.exe` by mistake. This only happens upon a fresh install, not when upgrading Git for Windows. A patch is included in version 2.37.1. Two workarounds are available. Create the `C:\mingw64` folder and remove read/write access from this folder, or disallow arbitrary authenticated users to create folders in `C:\`.
- How severe is CVE-2022-31012?
- CVE-2022-31012 has a CVSS 3.x base score of 8.2, rated high severity. It is exploitable over local access with low attack complexity, requires low privileges and user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2022-31012 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 0% (30th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2022-31012?
- CVE-2022-31012 affects Gitforwindows Git. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2022-31012?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
- When was CVE-2022-31012 published?
- CVE-2022-31012 was published on 2022-07-12 and last updated on 2026-06-17.
References
- https://github.com/git-for-windows/git/releases/tag/v2.37.1.windows.1
- https://github.com/git-for-windows/git/security/advisories/GHSA-gjrj-fxvp-hjj2
Affected products (1)
- cpe:2.3:a:gitforwindows:git:*:*:*:*:*:windows:*:*
More vulnerabilities in Gitforwindows Git
- CVE-2018-11235 — High (CVSS 7.8): 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, and 2.17.x before 2.17.1,…
- CVE-2021-46101 — High (CVSS 7.5): In Git for windows through 2.34.1 when using git pull to update the local warehouse, git.cmd can be run directly.
- CVE-2025-66413 — High (CVSS 7.4): Git for Windows is the Windows port of Git. Prior to 2.53.0(2), it is possible to obtain a user's NTLM hash by tricking…
All CVEs affecting Gitforwindows Git →
Other CWE-426 (Untrusted Search Path) vulnerabilities
- CVE-2026-45772 — Critical (CVSS 9.8): Turborepo is a high-performance build system for JavaScript and TypeScript codebases. From 1.1.0 to before 2.9.14,…
- CVE-2025-26155 — Critical (CVSS 9.8): NCP Secure Enterprise Client 13.18 and NCP Secure Entry Windows Client 13.19 have an Untrusted Search Path…
- CVE-2024-53866 — Critical (CVSS 9.8): The package manager pnpm prior to version 9.15.0 seems to mishandle overrides and global cache: Overrides from one…
- CVE-2024-38462 — Critical (CVSS 9.8): iRODS before 4.3.2 provides an msiSendMail function with a problematic dependency on the mail binary, such as in the…
- CVE-2023-30330 — Critical (CVSS 9.8): SoftExpert (SE) Excellence Suite 2.x versions before 2.1.3 is vulnerable to Local File Inclusion in the function…
- CVE-2022-24826 — Critical (CVSS 9.8): On Windows, if Git LFS operates on a malicious repository with a `..exe` file as well as a file named `git.exe`, and…
Browse all CWE-426 (Untrusted Search Path) vulnerabilities →