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

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

Affected products (1)

More vulnerabilities in Gitforwindows Git

All CVEs affecting Gitforwindows Git →

Other CWE-426 (Untrusted Search Path) vulnerabilities

Browse all CWE-426 (Untrusted Search Path) vulnerabilities →