CVE-2022-31012: Git for Windows' installer can be tricked into executing an untrusted binary
Vulnerability summary
CVE-2022-31012 is a high (CVSS 8.2) Untrusted Search Path vulnerability in git-for-windows git. EPSS estimates a 0.41% chance of exploitation in the next 30 days, higher than 37.3% of scored vulnerabilities.
Not severe (CVSS 8.2, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 12-07-2022PublishedVulnerability first disclosed.
- 23-04-2025Last modifiedVulnerability information updated.
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:\`.
CVSS metrics
3 scores · 2 sources · 2 versions- NVDNIST7.3HighCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:HDiffers
EPSS trend
Probability
0.41%
Chance of exploitation in the next 30 days
Percentile
37%
Versus all other CVEs
30-day change
Increase +0.02 pp
From 0.39% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: local access, low-privilege account, user interaction (CVSS vector). Other conditions: not stated in public data.
Git-for-windows1 product
- git< 2.37.1
Gitforwindows1 product
- git< 2.37.1
2 vendors · 2 products
References
2 links- github.com/git-for-windows/git/security/advisories/GHSA-gjrj-fxvp-hjj2X Refsource CONFIRMMitigationThird Party Advisory
- github.com/git-for-windows/git/releases/tag/v2.37.1.windows.1X Refsource MISCRelease NotesThird Party Advisory