Summary
Git for Windows prior to 2.53.0.windows.3 can leak a user's NTLM hash when Git performs transparent NTLM authentication against an attacker-controlled server.
An attacker who convinces a user to clone a malicious repository or check out a malicious branch that contacts their server can obtain the NTLMv2 hash and potentially brute-force it to recover credentials.
Affected context
This vulnerability affects Git for Windows installations that:
- Are configured (often by default in Windows environments) to use NTLM authentication for outbound HTTP/SMB connections
- Allow Git operations (clone, fetch, checkout) to reach remote resources controlled or influenced by an attacker
- Run in environments where NTLM hashes are accepted as part of domain or single sign-on authentication
The issue becomes relevant when user workflows involve cloning untrusted repositories or switching to branches from untrusted sources.
Exploit preconditions
- Attack surface: Git for Windows client performing network requests during repository operations.
- Required access: Ability to host or control a Git repository or reference that triggers connections to an attacker-controlled server (e.g., via submodules, redirects, LFS endpoints, hooks, or crafted configuration/URLs).
- User action: User must clone the malicious repository or check out a crafted branch or ref; no explicit authentication prompt is required if NTLM is used automatically.
- Why exploitation is possible: Git for Windows did not sufficiently restrict or sanitize network authentication flows, allowing transparent NTLM authentication to untrusted endpoints, which can capture the NTLMv2 hash.
Why this happens
The underlying issue aligns with CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Git for Windows allowed NTLM authentication handshakes to proceed automatically to remote servers referenced during Git operations, effectively sending hash material to endpoints that were not validated as trusted.
This behavior exposes authentication-derived secrets (NTLMv2 hashes) to attackers who can control the remote server, extending the trust boundary beyond what users reasonably expect when performing basic Git operations.
Potential impact
- Attackers may capture NTLMv2 hashes from users running Git for Windows.
- Captured hashes could be subjected to offline brute-force attacks to recover plaintext credentials.
- Compromised credentials can enable unauthorized access to Windows domains, file shares, VPNs, or other services using the same account.
- Attackers could leverage obtained credentials for lateral movement within corporate networks.
General mitigation guidance
Effective mitigations focus on reducing implicit credential exposure and tightening trust boundaries for outbound authentication:
- Limit or disable automatic NTLM authentication to untrusted or external endpoints where feasible, favoring mechanisms that require explicit user consent.
- Enforce strict policies around which remote URLs, submodules, and Git configuration values are allowed in corporate environments, especially when they imply external network access.
- Isolate high-privilege accounts from daily development activities; use low-privilege users for routine Git operations to minimize impact if hashes are exposed.
- Configure Windows and network authentication policies to restrict NTLM usage where possible, or to scope it to trusted domains.
- Educate users and teams to treat untrusted repositories similarly to untrusted code: avoid cloning or checking out branches from unknown or unverified sources in sensitive environments.
How teams detect issues like this
Organizations can approach detection by combining client, network, and repository-level monitoring:
- Review Git configuration (system, global, and repository-level) for patterns that direct traffic to unexpected or untrusted domains, especially in submodules or remote URLs.
- Monitor outbound network traffic from developer workstations for NTLM authentication attempts to unknown or external servers; flag anomalous NTLM handshakes.
- Apply static analysis or repository scanning tools to detect suspicious Git configuration entries (e.g., crafted remotes, submodules, or LFS endpoints) in codebases and templates.
- Incorporate security-focused code review practices for repositories that will be widely cloned internally, checking for embedded external references that could trigger automatic authentication.

