# CVE-2020-26233: Remote Code Execution in Git Credential Manager Core

> Attackers can execute arbitrary code on Windows by placing a malicious git.exe in a repository cloned with submodules, affecting Git Credential Manager Core users.

- **Severity:** High 7.3 (`CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** No
- **Published:** 8 Dec 2020
- **Updated:** 4 Aug 2024
- **Also known as:** GHSA-2gq7-ww4j-3m76

## What is CVE-2020-26233?

CVE-2020-26233 is a high-severity command injection vulnerability in microsoft Git-Credential-Manager-Core, published on 8 Dec 2020. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

### Official description

Git Credential Manager Core (GCM Core) is a secure Git credential helper built on .NET Core that runs on Windows and macOS. In Git Credential Manager Core before version 2.0.289, 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. 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). As a workaround, users should avoid recursively cloning untrusted repositories with the --recurse-submodules option.

Weakness: CWE-706 (Use of Incorrectly-Resolved Name or Reference)

## Which versions are affected by CVE-2020-26233?

It affects 1 product.


Products: Microsoft Git Credential Manager Core.

## How do I fix CVE-2020-26233?

No fix has been published for CVE-2020-26233 yet. Limit exposure of the affected software until one is available.

## Is CVE-2020-26233 being exploited?

There is no known exploitation of CVE-2020-26233 in the wild and no public exploit code.

Public exploit code:

- https://github.com/whr819987540/test_CVE-2020-26233 (github_poc): https://github.com/whr819987540/test_CVE-2020-26233
- https://github.com/an1p3lg5/CVE-2020-26233 (github_poc): https://github.com/an1p3lg5/CVE-2020-26233

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-26233 and fix it if it is affected.

What it is: CVE-2020-26233 is a high-severity command injection vulnerability in microsoft Git-Credential-Manager-Core, published on 8 Dec 2020. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2020-26233 in the wild and no public exploit code.

Affected product: microsoft Git-Credential-Manager-Core. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-26233/ (Markdown: https://insights.sbomify.com/CVE-2020-26233/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-26233
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-26233
- OSV: https://osv.dev/vulnerability/CVE-2020-26233

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-26233/
Summaries are generated and may contain mistakes; the official description above is the record.
