CVE-2022-31012 json
Git for Windows' installer can be tricked into executing an untrusted binary
published 2022-07-12 4 y ago modified 2026-06-17 4 mo ago also EUVD-2022-52715
- cvss
- 8.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 33%
- public exploits
- 0
- none known
Summary
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:\`.
Patch / fix
- git_for_windows_project git_for_windows 2.37.1.1
- gitforwindows git 2.37.1.1
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 18 mo ago
Exploit prediction
0.39% chance of exploitation in the next 30 days, higher than 33% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.2 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H |
| NVD | 3.1 | 7.3 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 4.4 | AV:L/AC:M/Au:N/C:P/I:P/A:P |
Affected products
- git-for-windows git
Classification
- Weakness
-
- CWE-426 Untrusted Search Path
References
-
github.com
/git-for-windows/git/security/advisories/GHSA-gjrj-fxvp-hjj2
mitigation, third-party-advisory
-
github.com
/git-for-windows/git/releases/tag/v2.37.1.windows.1
release-notes, third-party-advisory
Sources
- CVE List CVE-2022-31012
- NVD CVE-2022-31012
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: git for windows improved version ranges, cpes, etc.