Skip to content
Beta
All articles

MCP reference servers v2.5.0: five more ways a repository could run code in the Git server

A week after v2.4.0, the 18 November MCP servers release fixes eight more advisories, mostly in mcp-server-git. What changed, and what it says about deny-lists.

By The SpanDock team

5 min read

A diagram comparing two MCP servers releases one week apart: v2.4.0 on 11 November pinned eight Git settings; v2.5.0 on 18 November closed five more routes to running a program, through maintenance, lazy fetch, config includes, empty driver names and submodules

One week after the Model Context Protocol project hardened its reference Git server against a repository's own configuration, it had to do it again. Servers release v2.5.0, published on 18 November 2026, fixes eight vulnerabilities in three reference servers. Six are in mcp-server-git, and five of those let a repository make the server run a program through a route the previous fix did not cover. If your developers point coding agents at repositories through this server, upgrade it to 2026.11.18, and treat the pattern behind these fixes as the more lasting lesson.

What was fixed

The release notes list the packages to upgrade:

PackageAffectedFixed in
mcp-server-gitthrough 2026.11.112026.11.18
@modelcontextprotocol/server-filesystemall versions before 2.4.0, and date versions 2025.1.14 through 2026.8.312.4.0
@modelcontextprotocol/server-everythingthrough 2.3.02.3.1

The advisories rate five of the Git server issues high (the four with a score are CVSS 7.8), the sixth medium, and the filesystem and everything issues low (CVSS 2.2 and 3.7). None has a CVE identifier on the advisory pages as of 26 November.

Five new routes from configuration to a running program

The previous release, which we covered in MCP reference servers v2.4.0, stopped a repository's core.fsmonitor, diff.external, hooks, filters and merge drivers from running when an agent called a read-only tool. According to GHSA-6hqx-gqrx-c5r2, that fix forced a list of command-bearing settings off for every Git command the server runs and emptied the repository's own filter and merge drivers. The v2.5.0 advisories each found a setting or path outside that list:

  • Automatic maintenance after a merge. In GHSA-h2g3-rwxm-xfm3, a successful git_merge, a fast-forward included, ended in Git's automatic maintenance, whose garbage collection runs the command named in the repository's gc.recentObjectsHook. The reporter's proof of concept needed only a crafted .git/config and the model calling git_merge. Maintenance is now switched off for every command the server runs.
  • A lazy fetch of a missing object. In GHSA-87qg-cmw8-jc5m, a repository marked a remote as a "promisor" and named the program Git uses to reach it, for example through core.sshCommand. When a read-only tool asked for an object that was not on disk, Git tried to fetch it and ran that program. The advisory says a plain, complete repository was enough, and lists git_show, git_diff and git_branch --contains among the tools that triggered it. Lazy fetching is now turned off.
  • A configuration include created by the merge itself. A repository's configuration can include another file. If a merge or checkout created that file, a new driver could appear after the server had emptied the ones it found, and run during the git merge --abort that follows a conflict. The server now re-reads drivers after any tool writes the working tree.
  • A driver with an empty name. Git accepts a filter section named "", and the server's list of drivers to empty missed it.
  • A submodule's own configuration. With diff.submodule=diff, git_diff ran a nested diff inside each changed submodule under that submodule's settings, and git_checkout and git_add also ran Git inside submodules. Those overrides now reach submodules, and a Git older than 2.33 is refused for a repository with a checked-out submodule.

The sixth Git advisory, rated medium, is about reading rather than running: with --repository set, a crafted .git/index naming a path such as ../outside/secret made the diff tools return that file's content. The index is now checked before any tool reads it.

Two smaller fixes, and two stated limits

The filesystem server's directory listings could return the names of entries outside the allowed directories if a directory was swapped for a symlink between the check and the listing. The everything server's private-address guard read NAT64 addresses as public. Both are rated low.

The release notes are candid about what remains. After a tool writes the working tree, the --repository confinement check "is not yet repeated" (tracked as issue #5599). On Windows, a filesystem directory listing "is not yet anchored" to the checked directory (issue #5600). Neither is described as fixed.

There is also an upgrade trap for the filesystem server. Its npm releases moved from date versions to semantic versions, and package managers rank 2.4.0 below every 2025.x and 2026.x version. Anyone on a date version has to install @modelcontextprotocol/server-filesystem@2.4.0 explicitly; a normal update will not offer it.

Analysis: a deny-list of settings is not a boundary

The Git server's README promises, in the words quoted by GHSA-h2g3-rwxm-xfm3, that it never runs a program named by a repository's configuration. Git, however, has many settings that name programs, and more paths that start a second Git process which reads the same configuration. The v2.4.0 fix pinned a fixed set of keys. Within a week, three reporters had found five keys or paths outside it: maintenance, transport programs, includes, an empty section name and submodules.

This is the same lesson as the earlier ConfigPoisoning research on coding tools: any tool that runs Git inside a repository it does not trust is running code that the repository can influence. Pinning settings narrows that, and the maintainers' approach of refusing old Git versions that ignore the overrides is sound. But the set of command-bearing settings is open-ended, it grows with Git itself, and each new reporter starts from the last fix.

The more robust controls sit outside the server:

  • Run it in a sandbox with no credentials it doesn't need. The advisories stress that code runs with the server's privileges, including credentials passed in the client's environment.
  • Don't point it at untrusted repositories. The workaround in GHSA-6hqx-gqrx-c5r2, to use the server only on repositories whose .git directory you trust, applies to this whole class.
  • Don't treat "read-only" tools as safe by name. Several of these issues fired on tools such as git_show and git_diff, which clients may auto-approve.

What it means for engineering and security leaders

The reference servers are examples maintained by the protocol project, but many developers install them directly, and other tools that run Git for an agent face the same problem. Two releases a week apart, each fixing several high-rated issues of the same kind, suggest more will follow. That makes inventory and update speed the practical controls: you need to know which computers run mcp-server-git or the filesystem server, which version, and with what credentials in their environment.

It is also a prompt to review auto-approval settings. If an agent can call a Git tool without asking, a malicious repository, an archive or a pull request branch opened by the agent becomes a route to code execution on that computer.

Practical takeaways

  1. Upgrade mcp-server-git to 2026.11.18, @modelcontextprotocol/server-everything to 2.3.1 and @modelcontextprotocol/server-filesystem to 2.4.0, installing 2.4.0 explicitly if you are on a date version.
  2. Find where they run. Search MCP configuration files on developer computers and in container images for these package names.
  3. Remove credentials from the environment blocks of local MCP servers that don't need them.
  4. Stop auto-approving Git tools for agents that open repositories, archives or branches from outside the organisation.
  5. Watch issues #5599 and #5600 if you rely on --repository confinement or run the filesystem server on Windows.

Sources

  1. modelcontextprotocol/servers release v2.5.0 (18 November 2026)
  2. GitHub advisory GHSA-h2g3-rwxm-xfm3: mcp-server-git 2026.11.11, git_merge runs gc.recentObjectsHook from the repository's own config
  3. GitHub advisory GHSA-87qg-cmw8-jc5m: mcp-server-git, a repository's promisor configuration runs a program during a lazy fetch
  4. GitHub advisory GHSA-6hqx-gqrx-c5r2: mcp-server-git arbitrary command execution via a repository's own Git configuration (core.fsmonitor)
Cookie categories

Details: Cookie Policy.