Untrusted search path in Git for Windows - CVE-2022-31012

 

Untrusted search path in Git for Windows - CVE-2022-31012

Published: July 12, 2022 / Updated: April 20, 2026


Vulnerability identifier: #VU126566
CSH Severity: Low
CVSSv4.0: CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U/U:Clear
CVE-ID: CVE-2022-31012
CWE-ID: CWE-426
Exploitation vector: Local access
Exploit availability: No public exploit available
Vulnerable software:
Git for Windows
Software vendor:
Git for Windows

Description

The vulnerability allows a local user to execute arbitrary code.

The vulnerability exists due to untrusted search path in the installer when performing a fresh installation. A local user can place a malicious binary at C:\mingw64\bin\git.exe to execute arbitrary code.

User interaction is required to run the installer, and the issue occurs only during a fresh install, not during an upgrade.


Remediation

Install security update from vendor's website.

External links