Vulnerability  ·  2026-11-24

mcp-server-git --repository restriction bypass via nested .git gitdir pointer

VulnerabilityMedium impactGlobalCVE-2026-134465
In mcp-server-git before 2026.10.28, the --repository restriction can be bypassed with a nested directory containing a .git file whose gitdir pointer targets a repository outside the allowed path. A caller who can invoke the server's tools and place such a file in the allowed tree can read committed content from, and create branches in, a repository outside the configured boundary. CVSS 5.8 (CVSS 3.1).
The --repository restriction is the isolation boundary that keeps an LLM-agent's git MCP tools confined to an approved repository. This bypass lets an agent (or attacker directing it) read and write outside that boundary, breaking the sandboxed repository confinement and exposing unrelated code.
Local/agent-controlled — an agent with tool invocation can place a .git gitdir file in the allowed tree pointing to an outside repo, then read/commit to that repo.
mcp-server-git (modelcontextprotocol/servers) before 2026.10.28
Upgrade to 2026.10.28; enforce that resolved gitdir paths stay within the allowed repository root.
NVD detailGitHub advisory GHSA-w766-5x43-whvw
See this in the live feed Explore related AI security and governance findings — updated every morning.
Open the feed →