UTC
Low

Git merge overwrites ignored local files despite no-overwrite-ignore

GHSA-qf89-h82f-h5r5 · published 2026-11-27

Severity
Low
CVSS score
Not scored
Chance of exploitation (EPSS)
No CVE
Fixed in
2026.11.27
What it is

A caller with low-privilege ability to create or control a source branch in the admitted repository, and to invoke git_merge with fast_forward_only=false, can replace an ignored, operator-maintained .env during a divergent merge. The reproduction creates the source branch with local Git commands before starting the server, so it does not demonstrate unauthenticated branch creation. The CVSS 3.1 base score is 6.5 Medium, with vector . The network attack path requires the operator to expose the shipped --transport streamable-http mode with HOST=0.0.0.0 and a reachable port. …

What to do

Upgrade mcp-server-git to 2026.11.27 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.

Before either fast-forward or merge-commit execution, enumerate paths introduced by the selected commit and reject any path that would replace an ignored, untracked worktree file. Check the working tree and complete incoming tree rather than relying on is_dirty(), which intentionally omits ignored files. Keep command hardening, add a regression test with diverged branches, an ignored local .env, fast_forward_only=false, and an assertion that local bytes remain unchanged, and retain separate fast-forward and ordinary nonignored-file tests.

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

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].