Skip to content
Beta
All articles

MCP reference servers v2.4.0: a git_status call that could run code, and five more fixes

The 11 November MCP servers release fixes six advisories in the git, filesystem and fetch servers. What each one means, and how to upgrade safely.

By The SpanDock team

5 min read

A diagram of the three MCP reference servers fixed in v2.4.0: git with two fixes, filesystem with two and fetch with two, each with its fixed version

The most innocent-looking tool call in the reference Git MCP server could run a program. On 11 November 2026 the Model Context Protocol project published servers release v2.4.0, which fixes six advisories across three of its reference servers: git, filesystem and fetch. The headline flaw let a repository's own .git/config make mcp-server-git run a command when an agent called the read-only git_status tool. If your developers run any of these servers locally, this is an upgrade to do this week.

What was fixed

The release notes give the affected and fixed versions in one table:

PackageAffectedFixed in
mcp-server-git (PyPI)through 2026.11.42026.11.11
mcp-server-fetch (PyPI)through 2026.11.42026.11.11
@modelcontextprotocol/server-filesystem (npm)all versions before 2.3.0, and date versions 2025.1.14 through 2026.8.312.3.0

None of the six had a CVE identifier when this was written; they are tracked as GitHub advisories.

The git server: command execution through repository configuration

Git honours configuration keys that name programs to run. core.fsmonitor, for example, names a program Git starts whenever it refreshes the index. The advisory GHSA-6hqx-gqrx-c5r2 shows that mcp-server-git ran Git inside repositories chosen by the client without overriding the repository's own configuration. A git_status call on an untrusted repository therefore ran an attacker-chosen program with the server's privileges: its environment, including credentials passed in the client's env block, its file access and its user. The report notes there was no approval prompt and that the payload need not print anything, so the tool result looked normal.

core.fsmonitor is the demonstrated case, but the report lists others: diff.external through the diff tools, hooks through git_merge, filter drivers through git_add, and signing programs. GitHub rates the advisory high (CVSS 4.0 score 7.0, local attack vector).

The delivery condition matters. The malicious configuration lives in .git/config, so the repository has to reach the developer with its .git directory intact: an archive, a CI artifact, a shared folder or a vendored tree. The report points out that a plain git clone does not copy a server's .git/config, and GitHub's source ZIP leaves .git out.

The fix in 2026.11.11 is thorough. Every Git command now overrides the program-running settings through GIT_CONFIG_COUNT, which outranks every configuration file. Filter and merge drivers defined by the repository are emptied, while drivers from the user's global configuration, such as Git LFS, keep working. Diffs pass --no-ext-diff and --no-textconv. A Git older than 2.31, which ignores GIT_CONFIG_COUNT, is refused rather than run unprotected.

The git server: confinement through alternates and worktrees

The second git advisory, GHSA-q74p-4wrc-q7w6, rated moderate, is described as an incomplete fix for an earlier confinement bug (covered in our article on git and AWS Serverless path confinement). With --repository set, a repository inside the allowed one could still read another repository's objects through objects/info/alternates, or pass off a linked worktree's Git directory as the allowed one. Both are now refused, as are symlinks in a Git directory that lead outside. The release notes say a Windows directory junction is not yet covered.

The filesystem server: two time-of-check races

Both filesystem issues are races between checking a path and using it. In GHSA-p9cv-8g75-4xcg, a directory swapped for a symlink after the access check let read_text_file return a file from outside the allowed directories. Version 2.3.0 opens files relative to the directory that was checked, as writes already did, and refuses FIFOs, sockets and devices. The release notes say this closes the race on Linux and macOS but only narrows it on Windows. The second, move_file, could bring an outside file into the allowed directories through a similar swap, where it became readable.

The fetch server: two narrow bypasses

mcp-server-fetch had two issues GitHub rates low. Its private-address guard read the deprecated IPv6 site-local range fec0::/10 as public (GHSA-3rxj-6jhw-qfv7); it now refuses any IPv6 address outside global unicast that does not carry an IPv4 address. And robots.txt rules were matched only against the path as written, so //private could get past Disallow: /private.

Analysis: read-only is a property of the whole stack

The git flaw is a familiar class. Our earlier article on ConfigPoisoning and coding agents covered the same pattern in agent tools that shell out to Git, and the report itself names CVEs for other agent tooling. What makes this case worth dwelling on is the label. git_status is the tool most clients would auto-approve, because it reads. But the tool's behaviour depends on Git, and Git's behaviour depends on a file the attacker controls. A tool is only as read-only as everything it calls.

Three further points stand out:

  • The fix is a model for other MCP servers. Overriding risky settings on every invocation, refusing an old dependency that would silently ignore the override, and keeping trusted global drivers working is a pattern any server that wraps a CLI can copy.
  • Credentials in the env block travel with the server. Whatever a local MCP server process can read, a command it is tricked into running can read too.
  • Upgrades can fail silently on npm. The release notes warn that the TypeScript servers moved from date versions to semantic versions, so package managers rank 2.3.0 below every 2025.x and 2026.x version and won't offer it. If you are on a date version of the filesystem server, you must install 2.3.0 explicitly. We saw the same trap with the v2.1.0 release.

What it means for engineering and security leaders

The reference servers are often a team's first MCP servers, copied from a README into every developer's configuration. That makes them easy to forget and hard to inventory. The question is not whether you approved them, but where they are configured today, which versions run, and which credentials each one holds.

The git fix also changes the threat model for code review agents and CI jobs. Any workflow that unpacks archives or artifacts and then points an agent with a Git MCP server at them was exposed. Workspaces built from a fresh clone were not, by the report's own account.

Practical takeaways

  • Find every configuration that starts mcp-server-git, mcp-server-fetch or @modelcontextprotocol/server-filesystem, on developer computers and in CI.
  • Upgrade git and fetch to 2026.11.11 or later, and install @modelcontextprotocol/server-filesystem@2.3.0 explicitly if you were on a date version.
  • Check the Git version on machines running the git server. Below 2.31, the fixed server refuses to run.
  • Until upgraded, follow the advisory's only workaround: point the git server only at repositories whose .git directory you trust.
  • Move long-lived tokens out of local MCP env blocks where you can.
  • Stop treating "read-only" tool names as a reason to auto-approve when the tool wraps a program that reads attacker-controlled configuration.

If you run MCP servers through SpanDock's MCP gateway (Premium and Enterprise), you can add your own MCP servers as a program run on the server, and connector credentials stay in the server's credential store rather than on each computer. Every connector starts read-only for everyone. None of that patches a vulnerable server, though: upgrade it first, on whichever machine it runs.

Sources

  1. modelcontextprotocol/servers release v2.4.0 (11 November 2026)
  2. GitHub advisory GHSA-6hqx-gqrx-c5r2: mcp-server-git arbitrary command execution via a repository's own Git configuration
  3. GitHub advisory GHSA-q74p-4wrc-q7w6: mcp-server-git --repository confinement bypass via alternates and linked worktrees
  4. GitHub advisory GHSA-p9cv-8g75-4xcg: server-filesystem symlink swap after validation in read_text_file
  5. GitHub advisory GHSA-3rxj-6jhw-qfv7: mcp-server-fetch treated IPv6 site-local addresses as public
Cookie categories

Details: Cookie Policy.