Uncontrolled Search Path Element Affecting git-for-windows/git package, versions [,2.35.2)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.54% (67th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UNMANAGED-GITFORWINDOWSGIT-2635982
  • published13 Apr 2022
  • disclosed13 Apr 2022
  • creditHackAndPwn

Introduced: 13 Apr 2022

CVE-2022-24767  (opens in a new tab)
CWE-427  (opens in a new tab)

How to fix?

Upgrade git-for-windows/git to version 2.35.2 or higher.

Overview

Affected versions of this package are vulnerable to Uncontrolled Search Path Element via the default system settings for TMP and TEMP which point to C:\Windows\Temp, a folder that is world-writable, and the SYSTEM user account inherits those settings, which allows any authenticated user to place malicious .dll files that are loaded when Git for Windows' uninstaller is run via the SYSTEM account.

Workaround

Override SYSTEM's TMP environment variable to point to a directory exclusively under SYSTEM's control before running the uninstaller, clear C:\Windows\Temp of all .dll files before running the uninstaller, or run the uninstaller under an admin account rather than SYSTEM.

References

CVSS Base Scores

version 3.1