mcp-server-git: arbitrary command execution via a repository's own Git configuration (core.fsmonitor) during read-only tools
GHSA-6hqx-gqrx-c5r2 · published 2026-11-11
- Severity
- High
- CVSS score
- 7.8
- Chance of exploitation (EPSS)
- No CVE
- Fixed in
- 2026.11.11
Arbitrary code execution as the user running the MCP server. A developer running uvx mcp-server-git executes the payload as themselves; a CI/agent runner executes it as the runner account. Credential and data theft. The payload inherits the server's environment — including any secrets passed through the MCP client's env block — and can read the user's home directory, SSH keys, cloud credentials and every repository on the disk. No approval and no sandbox. The execution happens inside git, not through the model's own command-execution tool, so client-side confirmation dialogs and tool sandboxes never engage. From the client's perspective it merely asked Git for status. No visible signal. …
Upgrade mcp-server-git to 2026.11.11 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.
Fixed in mcp-server-git 2026.11.11 (#5514). Upgrade to 2026.11.11 or later. The report below was written against 2026.11.4, before the fix; its "Fixed versions: none" line predates it. The fix covers every sink the report lists, not only core.fsmonitor: Every Git command the server runs overrides, through GIT_CONFIG_COUNT (which outranks every configuration file and is inherited by the Git processes Git itself starts), the settings that would make Git run a program: core.fsmonitor is false; core.hooksPath points at the null device, so no hook runs; commit.gpgSign and merge.verifySignatures are false; submodule.recurse, status.submoduleSummary and merge.autoStash are false; and core.pager is…
None for affected versions other than upgrading. Until then, point the server only at repositories whose .git directory you trust.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| mcp-server-git | PyPI | < 2026.11.11 | 2026.11.11 |
- 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.