MCP Git server ran repository config programs during read-only calls
The official MCP reference servers fixed six flaws on November 11, 2026. The worst let a repository's own Git config run a program when an agent merely asked for git status.
What is this?
On November 11, 2026, the maintainers of the official Model Context Protocol reference servers published release v2.4.0, which fixes six vulnerabilities in three widely copied servers: Git, Filesystem and Fetch. One advisory is rated High, three Moderate and two Low. A community write-up on November 17 added practical upgrade guidance, including a version-ordering trap that can leave the Filesystem server unpatched.
The most instructive flaw is in mcp-server-git. An agent calling a tool as harmless as git_status could cause Git to execute a program named in the repository’s own configuration, with the privileges of the MCP server. Disabling write tools did not help, because the program ran during a read operation. It is a clean example of a lesson we have covered for stdio launchers and tool safety annotations: “read-only” describes the tool’s intent, not what the underlying binary may do.
How it works
Git config as code (High). Git treats some configuration keys as commands. According to the advisory, the Git server ran Git inside a client-chosen repository without overriding that repository’s .git/config. A key such as core.fsmonitor names a program Git launches to speed up status checks; diff.external plays the same role for diffs. So git_status, git_diff_unstaged and git_diff_staged could each start whatever the repository’s config pointed to. Anyone who can get a crafted repository in front of the agent (a cloned project, an archive, a pull request checkout) controls that config. The fix, in version 2026.11.11, forces safe values for these keys on every Git call through Git’s GIT_CONFIG_COUNT mechanism, disables external diff and textconv, and refuses Git older than 2.31.
Repository confinement bypass (Moderate). With --repository set, the server is supposed to stay inside one repository. A check added in an earlier fix missed two cases: an object store that borrows objects from another repository through objects/info/alternates, and a nested .git file pointing into a linked worktree, which let some calls act on the main repository’s state. Version 2026.11.11 refuses alternates and symlinks leading outside the allowed repository. Directory junctions on Windows are not yet detected.
Filesystem races (two Moderate). read_text_file validated a path and then opened it again by name. A local user able to rename directories inside an allowed folder could swap in a symlink between the two steps, a classic time-of-check/time-of-use race. A similar race affected move_file, where an outside file could be moved into the allowed directories and then read. Both are fixed in @modelcontextprotocol/server-filesystem 2.3.0.
Fetch guard gaps (two Low). The SSRF classifier treated the deprecated IPv6 site-local range as public, and the robots.txt check compared the path as written rather than as the origin normalizes it. Both are fixed in mcp-server-fetch 2026.11.11.
Why it matters
The reference servers are templates: many teams copy them or run them unmodified through npx or uvx. Coding agents routinely point a Git server at repositories they did not author, so the High flaw turns “inspect this repo” into code execution on the developer’s machine or CI runner. A prompt-injected agent does not even need to be convinced to do something dangerous; it only needs to call a status tool.
The upgrade itself has a trap. The Filesystem package once used date versions such as 2026.8.31, and npm ranks those above 2.3.0. A generic “update to latest” can therefore keep a vulnerable build. Note also that the v2.4.0 tag is a repository release, not a single installable version shared by the three packages.
Defenses
- Find what actually runs. Check each MCP host config to see whether it launches project npm, global npm,
npx, a Python venv,uvx,uv toolor Docker, and upgrade that exact target. - Pin the fixed versions explicitly:
@modelcontextprotocol/server-filesystem@2.3.0,mcp-server-git==2026.11.11andmcp-server-fetch==2026.11.11. Make sure the host’s Git is 2.31 or newer. - Treat repository config as untrusted input. Before any tool runs Git in a third-party checkout, audit its local config for keys that name programs:
# Lists repo-local keys that make Git run external programs (audit only)
git config --file .git/config --get-regexp \
'^(core\.fsmonitor|core\.hookspath|core\.sshcommand|diff\.external|diff\..*\.(textconv|command)|filter\..*)$'
- Isolate the server. Run Git and Filesystem servers in a container or VM with no credentials and no access beyond the workspace. An allowed-directory setting is a policy check, not a sandbox.
- Smoke-test, then verify. After upgrading, restart the host and run a read-only test against a disposable repository and directory. Leave a server disabled if the test fails, and do not restore an old config that re-enables a vulnerable package.
Status
| Advisory | Package | Severity | Fixed in |
|---|---|---|---|
| GHSA-6hqx-gqrx-c5r2 | mcp-server-git | High (7.8) | 2026.11.11 |
| GHSA-q74p-4wrc-q7w6 | mcp-server-git | Moderate (5.3) | 2026.11.11 |
| GHSA-p9cv-8g75-4xcg | server-filesystem | Moderate (4.4) | 2.3.0 |
| GHSA-7m4x-rv66-mxhh | server-filesystem | Moderate (5.0) | 2.3.0 |
| GHSA-f9hh-cmx9-2f23 | mcp-server-fetch | Low (3.1) | 2026.11.11 |
| GHSA-3rxj-6jhw-qfv7 | mcp-server-fetch | Low (3.1) | 2026.11.11 |
All six advisories were published on November 11, 2026, with release v2.4.0. None had a CVE identifier at publication.
Sources
- → https://github.com/modelcontextprotocol/servers/releases/tag/v2.4.0
- → https://github.com/modelcontextprotocol/servers/security/advisories/GHSA-6hqx-gqrx-c5r2
- → https://github.com/modelcontextprotocol/servers/security/advisories/GHSA-q74p-4wrc-q7w6
- → https://github.com/modelcontextprotocol/servers/security/advisories/GHSA-p9cv-8g75-4xcg
- → https://modelcontextprotocol.info/blog/reference-servers-security-update-2026-11/