Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security, Veeam & DevOps

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form

Git Vulnerability: Git for Windows uninstaller is vulnerable to DLL hijacking when run under the SYSTEM user account

Posted on 13/04/202216/08/2026 Christian By Christian No Comments on Git Vulnerability: Git for Windows uninstaller is vulnerable to DLL hijacking when run under the SYSTEM user account
  1. Home
  2. Version Control System
  3. Git Vulnerability: Git for Windows uninstaller is vulnerable to DLL hijacking when run under the SYSTEM user account
Git

Git is a version control system that allows developers to track a project and actively contribute without interfering with each other’s work. It supports collaboration within a project and helps prevent miscommunication or code clashing between team members. Git is a very supported open source project and the project maintainers have shown balanced judgment and a mature approach to meeting the long-term needs of its users with regular releases that improve usability and functionality. The quality of the open-source software is easily scrutinized and countless businesses rely heavily on that quality. Here are some related guides: How to install Git on macOS, how to install, register and start GitLab Runner on Windows, and How to set up HTTPS users using Git credentials and Pushing Code to AWS CodeCommit. For a comprehensive list of guides on GIT, kindly click on this link.

Git has released a new verson to address some security vulnerabilities, As reported, we are aware that GitHub is affected. But there is a need to upgrade your local installation of Git, especifially when you are using Git on Windows or on multi-user machines. All credit goes to to 俞晨东, and the fix was authored by Johannes Schindelin.

CVE-2022-24765

As stated in this article, this vulnerability affects multi-user machines, Git users might find themselves unexpectedly in a Git worktree, e.g. when another user created a repository in C:\.git, in a mounted network drive or in a scratch space. Merely having a Git-aware prompt that runs git status (or git diff) and navigate to a directory that is supposedly not a Git worktree, or open such a directory in an editor or IDE such as VS Code or Atom, which will potentially run commands defined by that other user.

Vulnerability Impact

Since part of Git for Windows’ uninstaller is copied into the current user’s temporary directory and run in that place, it is important to ensure that there are no malicious .dll file in that directory that might be loaded as part of loading the executable.

Yet, the default TMP and TEMP settings point to C:\Windows\Temp—a world-writable folder due to historical reasons. The SYSTEM user account inherits these settings. Authenticated users can insert malicious .dll files, which load when the SYSTEM account runs Git for Windows’ uninstaller.

How to Remediate this vulnerability

The most effective way to protect against this vulnerability is to upgrade to Git v2.35.2. This version changes Git’s behavior when looking for a top-level .git directory to stop when its directory traversal changes ownership from the current user. (If you wish to make an exception to this behavior, you can use the new multi-valued safe.directory configuration).

Vulnerability

Ensure uninstalling the previous Git version and installing the new “Git for Windows 2.35.2” version as demonstrated below.

Git for Windows

Workaround

If you can’t upgrade immediately, there is a workaround to help reduce the following risk discussed above.

  • Override SYSTEM’s TMP environment variable to point to a directory exclusively under SYSTEM’s control before running the uninstaller
  • Sweeping C:\Windows\Temp of all .dll files before running the uninstaller
  • Running the uninstaller under an admin account rather than SYSTEM.

Note: Since GitHub does not run git outside of known repositories, so is not susceptible to the attack described by CVE-2022-24765. Likewise, GitHub does not use Git for Windows, and therefore not unaffected  CVE-2022-24767. Kindly refer to these related guides: Azure DevOps and GitHub integration for Docker and Kubernetes deployment, how to create a static pod in Kubernetes, and how to install, register and start GitLab Runner on Windows.

Note: As of today, the 17th of April, there is a version of Git for Windows. Kindly click on this link to download it.

DLL hijacking

I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
Version Control System Tags:Git, Github, Microsoft Windows, Windows 10, Windows 11, Windows Server 2016

Post navigation

Previous Post: Prevent Windows Users from Changing the Screen Saver via the Registry Settings
Next Post: Check Weather Conditions via Command Line on Windows, macOS, Linux and Web

Related Posts

  • ArchiveUnarchiveDelete134
    Manage a GitLab Project: How to archive or unarchive and delete GitLab projects Version Control System
  • automatepythonsinwindows
    Python Automation in Windows with Visual Studio Code Version Control System
  • banner
    How to fix Git always asking for my Username and Password Version Control System
  • Gitfixed
    GitLab-runner is not recognized as an internal or external command, operable program, or batch file Version Control System
  • banner
    Fix npm install hangs on “sill idealTree buildDeps” Linux
  • Slide2
    How to Setup Jenkins Pipelines Environment for Docker Container Deployment Containers

More Related Articles

banner2 How to Integrate Postman With GitHub Automation
connect GitHub and Build a CI:CD Pipeline with Vercel How to connect GitHub and Build a CI/CD Pipeline with Vercel Version Control System
Banner How to Deploy GitHub Repositories to cPanel using GitHub Actions Automation
Deploy Web App from GitHub Deploy Code from GitHub to Azure Apps Services via the Command line AWS/Azure/OpenShift
Screenshot 2022 03 20 at 20.37.16 Setup HTTPS users using Git credentials and Pushing Code to AWS CodeCommit AWS/Azure/OpenShift
Screenshot 2024 02 28 at 11.17.41 PM GitHub Pages Deployment Guide Linux

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

vexpert-badge-stars-5

Virtual Background

VEEAMLEGEND

Categories

Top 30 Sysadmin blog

veeaam100

Veeam Vanguard

  • jhgfx
    How to make Cortana use your default web browser such as Google Chrome Windows
  • BitLocker renamedevicefghjkl
    What are the effect of renaming an MBAM-Protected Computer Windows
  • LAPS PAssword Not Showing Up
    LAPS password not showing up in GUI Windows
  • LINUX CONTAINERS
    How to install LXC/LXD for container management Linux
  • image 92
    Install Let’s Encrypt Wildcard SSL Certificate in cPanel using Certify Configuration Management Tool
  • BitLocker Protection off Update UEFI BIOS to fix issues
    BitLocker Protection off: Update UEFI/BIOS to fix issues Windows
  • Hide or Show User Accounts from Login Screen on Windows 10 and 11
    How to Hide or Show User Accounts from Login Screen on Windows 10 and 11 Windows
  • understanding azure active directory and enterprise mobility security ems 16 638
    Methods for Integrating Azure Active Directory with on-Premise Active Directory AWS/Azure/OpenShift

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,745 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Contact
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon
  • Bsky

Tags

Active Directory Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2026 TechDirectArchive

Loading Comments...

You must be logged in to post a comment.