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.
However, the default system settings for TMP
and TEMP
are to point to C:\Windows\Temp
, a folder that is world-writable (for historical reasons), and the SYSTEM user account inherits those settings. This means that any authenticated user can place malicious .dll
files that are loaded when Git for Windows' uninstaller is run via the SYSTEM account.
Patches
Fixes are available in Git for Windows v2.35.2 or newer.
Workarounds
- 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
Credits
Thank you Lockheed Martin Red Team for finding and reporting this vulnerability!
References
For more information
CVSS v3.1 Vector AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N/E:P/RL:T/RC:C/CR:X/IR:X/AR:X/MAV:L/MAC:H/MPR:L/MUI:R/MS:U/MC:H/MI:H/MA:N
If you have any questions or comments about this advisory:
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.However, the default system settings for
TMP
andTEMP
are to point toC:\Windows\Temp
, a folder that is world-writable (for historical reasons), and the SYSTEM user account inherits those settings. This means that any authenticated user can place malicious.dll
files that are loaded when Git for Windows' uninstaller is run via the SYSTEM account.Patches
Fixes are available in Git for Windows v2.35.2 or newer.
Workarounds
TMP
environment variable to point to a directory exclusively under SYSTEM's control before running the uninstallerC:\Windows\Temp
of all.dll
files before running the uninstallerCredits
Thank you Lockheed Martin Red Team for finding and reporting this vulnerability!
References
For more information
CVSS v3.1 Vector AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N/E:P/RL:T/RC:C/CR:X/IR:X/AR:X/MAV:L/MAC:H/MPR:L/MUI:R/MS:U/MC:H/MI:H/MA:N
If you have any questions or comments about this advisory: