CVE-2020-26233

7.3 HIGH

📋 TL;DR

CVE-2020-26233 is a path traversal vulnerability in Git Credential Manager Core (GCM Core) on Windows that allows arbitrary code execution when recursively cloning repositories with submodules. If a malicious git.exe is placed in the top-level repository, GCM Core will execute it instead of the legitimate system git.exe. This affects Windows users of GCM Core before version 2.0.289 who clone untrusted repositories with the --recurse-submodules option.

💻 Affected Systems

Products:
  • Git Credential Manager Core
Versions: All versions before 2.0.289
Operating Systems: Windows
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects Windows systems. macOS and Linux distributions are not vulnerable. Requires the --recurse-submodules flag during git clone.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise via arbitrary code execution with the privileges of the user running Git, potentially leading to credential theft, data exfiltration, or lateral movement.

🟠

Likely Case

Attackers could execute malicious code to steal Git credentials, modify source code, or install backdoors in development environments.

🟢

If Mitigated

With proper controls, the impact is limited to the user's local environment without affecting other systems or network resources.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires the victim to clone a malicious repository with --recurse-submodules. The attack vector is well-documented in public advisories.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.0.289

Vendor Advisory: https://github.com/microsoft/Git-Credential-Manager-Core/security/advisories/GHSA-2gq7-ww4j-3m76

Restart Required: No

Instructions:

1. Update Git Credential Manager Core to version 2.0.289 or later. 2. For Git for Windows users, update to version 2.29.2(3) or later which includes the fixed GCM Core. 3. Verify the update by checking the GCM Core version.

🔧 Temporary Workarounds

Avoid recursive cloning of untrusted repositories

windows

Do not use the --recurse-submodules option when cloning repositories from untrusted sources.

git clone <repository_url>
# Do NOT add --recurse-submodules flag

🧯 If You Can't Patch

  • Disable GCM Core and use alternative credential storage methods.
  • Implement strict source control policies to only clone repositories from trusted sources.

🔍 How to Verify

Check if Vulnerable:

Check GCM Core version: run 'git credential-manager-core --version' or 'git config --global credential.helper' to see if GCM Core is configured.

Check Version:

git credential-manager-core --version

Verify Fix Applied:

Verify GCM Core version is 2.0.289 or higher: 'git credential-manager-core --version' should show version >= 2.0.289.

📡 Detection & Monitoring

Log Indicators:

  • Unusual git.exe execution from repository directories rather than system paths
  • Failed authentication attempts or credential access from unexpected locations

Network Indicators:

  • Unexpected outbound connections from git processes to suspicious IPs

SIEM Query:

Process creation where parent process is git.exe and command line contains --recurse-submodules, OR file creation events for git.exe in user-writable directories

🔗 References

📤 Share & Export