UTC
Medium

mcp-server-git: Incomplete Fix for GHSA-w766-5x43-whvw in validate_opened_repo() Allows --repository Confinement Bypass via objects/info/alt

GHSA-q74p-4wrc-q7w6 · published 2026-11-11

Severity
Medium
CVSS score
5.3
Chance of exploitation (EPSS)
No CVE
Fixed in
2026.11.11
What it is

GHSA-w766-5x43-whvw ("mcp-server-git: nested gitdir file bypasses --repository confinement", published 2026-10-28) demonstrated that when mcp-server-git is started with --repository , a caller able to write plain files inside (for example via @modelcontextprotocol/server-filesystem write_file, with no symlink capability required) could place a .git redirection file inside /nested to read and modify a repository outside . To remediate GHSA-w766-5x43-whvw, validate_opened_repo() was added in src/git/src/mcp_server_git/server.py (lines 418?474) to inspect --git-dir, --git-common-dir, and --show-toplevel. …

What to do

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. Versions before 2026.10.28 are covered by GHSA-w766-5x43-whvw. Under --repository, the fix closes both bypasses in this report and the class around them: A repository whose Git directory names an alternate object store (objects/info/alternates or objects/info/http-alternates, of any kind) is refused: under --repository, a repository reads only its own objects. …

If you cannot upgrade yet

None for affected versions other than upgrading. On Windows, until the follow-up ships, do not rely on --repository to confine the server against a client that can create junctions inside the allowed repository.

Affected
PackageRegistryAffectedFixed in
mcp-server-gitPyPI>= 2026.10.28, < 2026.11.112026.11.11

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