CVE-2022-31012: git-for-windows git Untrusted Search Path
Vulnerability summary
CVE-2022-31012 is a high (CVSS 8.2) Untrusted Search Path vulnerability in git-for-windows git. EPSS estimates a 0.39% chance of exploitation in the next 30 days, higher than 32.1% of scored vulnerabilities.
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.39%
Chance of exploitation in the next 30 days
Percentile
32%
Versus all other CVEs
30-day change
0.00 pp
From 0.39% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
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