UTC
High

mcp-server-git: a config include created by the merged branch runs a command during git_merge

GHSA-9vjp-x34c-xg6v · published 2026-11-18

Severity
High
CVSS score
7.8
Chance of exploitation (EPSS)
No CVE
Fixed in
2026.11.18
What it is

Arbitrary command execution as the user running the MCP server. The preconditions are narrower than GHSA-6hqx-gqrx-c5r2, so they are worth stating exactly: The attacker supplies a repository with an attacker-written .git/config: an archive, a shared folder, a copied workspace. A plain clone does not carry it. That repository has a branch which adds the included file and conflicts with the current branch. Someone calls git_merge on that branch with fast_forward_only=false. That is not the default, but it is the documented way to merge diverged branches. --repository confinement does not help. The tool's response looks like an ordinary merge conflict.

What to do

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.

With this change the exploit legs stop running the payload, whether or not the separate empty-driver-name issue is also fixed, and git_merge still reports the conflict and leaves the repository clean. A broader option is to refuse repository-scope include.path and includeIf.*.path in harden_repo. That covers any future tool that changes the working tree and then runs git again. We did not test it.

If you cannot upgrade yet

Do not merge branches of repositories you received from someone else, or do it in a fresh clone where the .git/config is the one git wrote. Run the server as a user without credentials that matter. Require approval for git_merge specifically. The read-only tools are not affected here.

Affected
PackageRegistryAffectedFixed in
mcp-server-gitPyPI>= 2026.11.4, < 2026.11.182026.11.18

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.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by the MCP reference servers project (https://github.com/modelcontextprotocol/servers/security/advisories); advisories published by the MCP Inspector project (https://github.com/modelcontextprotocol/inspector/security/advisories); advisories published by the MCP TypeScript SDK project (https://github.com/modelcontextprotocol/typescript-sdk/security/advisories); advisories published by the MCP Go SDK project (https://github.com/modelcontextprotocol/go-sdk/security/advisories); advisories published by the MCP Java SDK project (https://github.com/modelcontextprotocol/java-sdk/security/advisories); advisories published by the MCP Kotlin SDK project (https://github.com/modelcontextprotocol/kotlin-sdk/security/advisories); advisories published by the MCP Rust SDK project (https://github.com/modelcontextprotocol/rust-sdk/security/advisories); advisories published by the MCP Ruby SDK project (https://github.com/modelcontextprotocol/ruby-sdk/security/advisories); advisories published by the MCP C# SDK project (https://github.com/modelcontextprotocol/csharp-sdk/security/advisories); advisories published by the MCP PHP SDK project (https://github.com/modelcontextprotocol/php-sdk/security/advisories); advisories published by the MCP Registry project (https://github.com/modelcontextprotocol/registry/security/advisories); advisories published by Open Terminal (https://github.com/open-webui/open-terminal/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-12-06. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].