{"id":"CVE-2022-31012","aliases":["EUVD-2022-52715","GHSA-gjrj-fxvp-hjj2"],"status":"published","title":"Git for Windows' installer can be tricked into executing an untrusted binary","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:\\`.","severity":{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00394,"percentile":0.33858,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-426"],"published":"2022-07-12T20:35:15Z","modified":"2026-10-28T02:31:11Z","products":[{"vendor":"git-for-windows","product":"git"},{"vendor":"gitforwindows","product":"git"}],"references":[{"url":"https://github.com/git-for-windows/git/security/advisories/GHSA-gjrj-fxvp-hjj2","tags":["x_refsource_CONFIRM","x_transferred","Mitigation","Third Party Advisory","advisory"]},{"url":"https://github.com/git-for-windows/git/releases/tag/v2.37.1.windows.1","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31012.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31012","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2022-31012","title":"Git for Windows' installer can be tricked into executing an untrusted binary","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:\\`.","status":"published","published":"2022-07-12T20:35:15Z","modified":"2025-04-23T18:02:50.999Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-426"],"updated_at":"2026-11-02T14:34:35.279735Z"}],"euvd":[{"id":"EUVD-2022-52715","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:\\`.","status":"published","published":"2022-07-12T20:35:15Z","modified":"2025-04-23T18:02:50Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T20:52:09.919052Z"}],"nvd":[{"id":"CVE-2022-31012","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:\\`.","status":"published","published":"2022-07-12T21:15:09.843Z","modified":"2026-06-17T04:44:36.17Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","level":"high","assessor":"secondary"},{"version":"3.1","score":7.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":4.4,"vector":"AV:L/AC:M/Au:N/C:P/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-426"],"updated_at":"2026-11-02T14:07:23.322724Z"}],"osv":[{"id":"CVE-2022-31012","title":"Git for Windows' installer can be tricked into executing an untrusted binary","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:\\`.","status":"published","published":"2022-07-12T20:35:15Z","modified":"2026-10-28T02:31:11.921773665Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-426"],"updated_at":"2026-11-02T15:44:25.516981Z"}]}}
