CVE-2022-41953 Git clone remote code execution vulnerability in git-for-windows
Git for Windows GUI executes a bundled aspell.exe from the current directory, allowing remote code execution via malicious repositories.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2022-41953?
CVE-2022-41953 is a high-severity command injection vulnerability in git-for-windows git, published on 17 Jan 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
Git GUI is a convenient graphical tool that comes with Git for Windows. Its target audience is users who are uncomfortable with using Git on the command-line. Git GUI has a function to clone repositories. Immediately after the local clone is available, Git GUI will automatically post-process it, among other things running a spell checker called `aspell.exe` if it was found. Git GUI is implemented as a Tcl/Tk script. Due to the unfortunate design of Tcl on Windows, the search path when looking for an executable _always includes the current directory_. Therefore, malicious repositories can ship with an `aspell.exe` in their top-level directory which is executed by Git GUI without giving the user a chance to inspect it first, i.e. running untrusted code. This issue has been addressed in version 2.39.1. Users are advised to upgrade. Users unable to upgrade should avoid using Git GUI for cloning. If that is not a viable option, at least avoid cloning from untrusted sources.
Weakness: CWE-426
Which versions are affected by CVE-2022-41953?
It affects 1 product.
Products include Git-Scm Git.
How do I fix CVE-2022-41953?
Upgrade to a fixed version.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2022-41953 being exploited?
There is no known exploitation of CVE-2022-41953 in the wild and no public exploit code.
Other vulnerabilities in git-for-windows git
Sources
Also known as AZL-13025, GHSA-v4px-mx59-w99c, OESA-2023-1059.