CVE-2022-24767 in Visual Studioinfo

Summary

by MITRE • 04/12/2022

GitHub: Git for Windows' uninstaller vulnerable to DLL hijacking when run under the SYSTEM user account.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 10/01/2024

The vulnerability identified as CVE-2022-24767 affects Git for Windows uninstaller and represents a significant security risk due to its susceptibility to DLL hijacking when executed under the SYSTEM user account. This flaw exploits the improper handling of dynamic link library loading mechanisms during the uninstallation process, creating a path for malicious code execution with elevated privileges. The vulnerability specifically manifests when the uninstaller runs with system-level permissions, allowing attackers to manipulate the execution flow through malicious DLL placement in predictable system directories.

The technical root cause of this vulnerability lies in the uninstaller's failure to properly specify the full path for dynamically loaded libraries, relying instead on the system's default library search order. When executed under the SYSTEM account, the uninstaller process inherits elevated privileges and searches for required DLLs in predictable locations including the current working directory and system paths. Attackers can exploit this behavior by placing malicious DLL files in these directories, causing the uninstaller to load and execute unauthorized code with system-level privileges. This vulnerability directly maps to CWE-426 Untrusted Search Path and aligns with ATT&CK technique T1059.001 Command and Scripting Interpreter with specific focus on DLL hijacking operations.

The operational impact of this vulnerability extends beyond simple privilege escalation, as it provides attackers with a reliable method to execute arbitrary code with SYSTEM privileges during the uninstallation process. This creates a window of opportunity for persistent threat actors to establish backdoors, deploy additional malware, or conduct further reconnaissance within the compromised system. The vulnerability is particularly concerning because it operates during a routine system maintenance operation, making detection more challenging and exploitation less likely to raise immediate alarms. The elevated privileges gained through this attack vector enable full system compromise, including access to sensitive data, modification of system files, and potential lateral movement to other networked systems.

Mitigation strategies for CVE-2022-24767 should focus on both immediate remediation and long-term defensive measures. The most effective immediate solution involves applying the vendor-provided patch or update that addresses the DLL loading behavior in the uninstaller process. Organizations should also implement strict access controls and privilege management to minimize the risk of unauthorized execution under SYSTEM accounts. System administrators should monitor for suspicious DLL loading patterns and implement application whitelisting policies that restrict execution of unauthorized binaries. Additionally, security teams should conduct regular vulnerability assessments focusing on uninstaller processes and their privilege escalation capabilities. The implementation of process monitoring tools that can detect anomalous DLL loading behaviors during system maintenance operations provides an additional layer of defense. Network segmentation and least privilege principles should be enforced to limit the potential impact of successful exploitation, ensuring that even if an attacker gains elevated privileges, their lateral movement capabilities remain constrained.

Responsible

Microsoft

Reservation

02/10/2022

Disclosure

04/12/2022

Moderation

accepted

CPE

ready

EPSS

0.01350

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!