Learn about CVE-2023-29012 impacting Git for Windows. Uncontrolled Search Path Element vulnerability allows unauthorized execution of `doskey.exe` before Git CMD. Discover mitigation steps and long-term security practices.
Git CMD erroneously executes
doskey.exe
in the current directory, if it exists
Understanding CVE-2023-29012
This CVE highlights an Uncontrolled Search Path Element vulnerability in Git for Windows prior to version 2.40.1. It allows the execution of
doskey.exe
if placed maliciously in an untrusted directory when Git CMD is launched.
What is CVE-2023-29012?
Git for Windows is the Windows port of Git, and this vulnerability impacts users of Git CMD who initiate the command in an untrusted directory. The flaw allows
doskey.exe
to be executed silently, posing a security risk.
The Impact of CVE-2023-29012
The vulnerability can lead to unauthorized code execution with high impact on confidentiality, integrity, and availability. Users running Git CMD in an untrusted directory are at risk of unintentionally executing malicious commands.
Technical Details of CVE-2023-29012
This section provides insights into the vulnerability's description, affected systems, and the exploitation mechanism.
Vulnerability Description
Prior to Git for Windows v2.40.1, an Uncontrolled Search Path Element vulnerability in Git CMD allows the unintended execution of
doskey.exe
if placed in an untrusted directory.
Affected Systems and Versions
The vulnerability affects Git for Windows versions earlier than 2.40.1. Users running Git CMD are susceptible to this security issue.
Exploitation Mechanism
Malicious placement of
doskey.exe
in an untrusted directory can exploit this vulnerability. When Git CMD is launched in such a location, the malicious payload is executed silently.
Mitigation and Prevention
Discover immediate steps to take and long-term security practices to safeguard your systems.
Immediate Steps to Take
To mitigate the risk, users should update to Git for Windows v2.40.1 or later. Additionally, avoid using Git CMD or ensure it is not initiated in an untrusted directory.
Long-Term Security Practices
Implement secure coding practices, regularly update software, and conduct security assessments to prevent similar vulnerabilities. Educate users on safe command execution practices.
Patching and Updates
Ensure timely application of security patches and updates to address known vulnerabilities and enhance system security.