Skip to content

Git recursive clone can result in remote code execution facilitated by GCM Core (affects Windows only)

High
mjcheetham published GHSA-2gq7-ww4j-3m76 Dec 8, 2020

Package

No package listed

Affected versions

<= 2.0.280

Patched versions

2.0.289

Description

Impact

When recursively cloning a Git repository on Windows with submodules, Git will first clone the top-level repository and then recursively clone all submodules by starting new Git processes from the top-level working directory. If a malicious git.exe executable is present in the top-level repository then this binary will be started by Git Credential Manager Core when attempting to read configuration, and not git.exe as found on the %PATH%.

This only affects GCM Core on Windows, not macOS or Linux-based distributions.

Patches

GCM Core version 2.0.289 contains the fix for this vulnerability, and is available from the project's GitHub releases page. GCM Core 2.0.289 is also bundled in the latest Git for Windows release; version 2.29.2(3).

Workarounds

Users should avoid recursively cloning untrusted repositories with the --recurse-submodules option.

Credits

Credit for reporting the vulnerability goes to Vitor Fernandes.

References

For more information

If you have any questions or comments about this advisory:

Severity

High

CVE ID

CVE-2020-26233

Weaknesses

No CWEs