mcp-server-git: a repository's promisor configuration runs a program during a lazy fetch
GHSA-87qg-cmw8-jc5m · published 2026-11-18 · updated 2026-11-27
- Severity
- High
- CVSS score
- 7.8
- Chance of exploitation (EPSS)
- No CVE
- Fixed in
- 2026.11.18
An attacker who supplies a repository runs an arbitrary program as the account serving the tool, from a read-only call, in the default configuration and under --repository. Delivery needs a channel that carries the .git directory: a tar or zip of a working tree, a shared folder, a CI artifact, a copied workspace. A git clone does not carry local configuration, which is the same limitation the other repository-configuration findings accept. The program runs before any connection is made, so the attacker needs neither a reachable remote nor credentials. Read access to the outside is enough to choose the target repository's path: the payload, not the network, decides what happens next.
Upgrade mcp-server-git to 2026.11.18 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
and, in the environment harden_repo builds for every git command: GIT_NO_LAZY_FETCH=1 stops the fetch before git selects a transport at all. protocol.allow=never refuses every transport if one is ever reached again. Both were verified against the installed package: the exploit legs stop and the normal tools keep working.
Run the server against complete repositories, or set GIT_NO_LAZY_FETCH=1 in its environment. Do not open repositories received as archives or shared folders. Run the server as a user without credentials that matter.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| mcp-server-git | PyPI | < 2026.11.18 | 2026.11.18 |
- CriticalUnauthenticated Remote Code Execution in Langflow via Public Flow Build EndpointlangflowExploited
- CriticalRay is vulnerable to Critical RCE via Safari & Firefox Browsers through DNS Rebinding AttackrayExploited
- CriticalLangflow Unauth RCElangflow, langflow-baseExploited
- HighLiteLLM: Authenticated command execution via MCP stdio test endpointslitellmExploited
- CriticalMLflow vulnerable to remote code execution on unauthenticated servers via third-party scorer deserialization importing caller-placed artifacmlflow
- CriticalAgno: Arbitrary code execution via `eval()` on `field_type` in `FunctionCall`agno
- Criticalmcp-server-git runs a repo's gpg.program via git_merge and git_branchmcp-server-git
- Criticalgit_add runs submodule filter commands when gitlink mode is not 160000mcp-server-git
- Criticalmcp-server-git: unexpandable sparse index lets submodule filter drivers runmcp-server-git
- Criticalgit: harden_repo ignores core.worktree, so repository-defined filters runmcp-server-git
- Criticalmcp-server-git --repository: checks a bare repo but runs a hidden .git's filtermcp-server-git
- Highgit: index entries under a symlink leak files outside --repositorymcp-server-git
The impact, patch and workaround text comes from the advisory, shortened (published by the MCP reference servers project). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.