Skip to content
The Injection_
LIVE
LIVElast sweep next in--:--:--

[ RSS ][ JSON ][ llms.txt ]

mcp-server-git: six ways a repository's own config runs commands

mcp-server-git before 2026.11.18 ran programs named in a repository's own git config, so an agent's git tools could run an attacker's command.

· Model Context Protocol · Research by pterpen, Zachariah Mithani (AploSec), Yusef Syed, Louis LAURENT (Kryve), ZackaryLoevseth

mcp-server-git
HIGHVulnerability

mcp-server-git before 2026.11.18 let a repository's own git config run programs as the MCP server user, through five paths. The Model Context Protocol project published eight advisories on November 18 and shipped the fixes in v2.5.0.

01What happened

The Model Context Protocol project published eight security advisories on November 18, 2026 and shipped every fix the same day in release v2.5.0. Six of the eight affect mcp-server-git, the project's reference git server for AI agents. Four outside reporters found them: pterpen, Zachariah Mithani of AploSec, Yusef Syed, and Louis LAURENT of Kryve.

02How it works

Each flaw reaches a git configuration key that the server's hardening did not pin. One advisory shows a promisor remote naming a program that git runs during a lazy fetch, started by read-only tools such as git_show. Another shows gc.recentObjectsHook firing after any successful git_merge, and a third shows a config include that resolves only after a merge restores the missing file. A fourth path uses a filter driver with an empty name, which the hardening regex never matched.

03Who is affected

Every mcp-server-git release before 2026.11.18 carries at least one path, and the reporters tested 2026.11.11, tag v2.4.0. The same batch patches @modelcontextprotocol/server-filesystem below 2.4.0 and @modelcontextprotocol/server-everything below 2.3.1, listed below. The advisories note that a plain git clone does not carry a remote repository's local config, so the crafted .git directory has to arrive another way, such as an archive, a shared folder or a CI artifact.

04What to do

Upgrade mcp-server-git to 2026.11.18, server-filesystem to 2.4.0 and server-everything to 2.3.1. Until the upgrade lands, the advisories suggest setting GIT_NO_LAZY_FETCH=1 in the server's environment and requiring approval for git_merge. Do not point the server at a repository that arrived as an archive or in a shared folder.

Questions people ask

Is mcp-server-git patched against the git config command execution flaws?
mcp-server-git 2026.11.18 patches all six flaws, shipped in the Model Context Protocol servers release v2.5.0 on November 18, 2026. The release notes say it stops automatic git maintenance after merges, disables lazy fetching of missing objects, re-reads drivers after writes, blanks drivers with empty names, refuses index entries outside the working tree, and stops submodule configurations from running programs.
Which mcp-server-git versions are affected?
All mcp-server-git releases before 2026.11.18 carry at least one of the six paths, and the reporters ran their proofs of concept against 2026.11.11, tagged v2.4.0. Two advisories, the gc.recentObjectsHook path and the config-include path, name a narrower range of 2026.11.4 up to 2026.11.18, because both depend on the git_merge tool added in that line.
Does cloning a repository expose me to the mcp-server-git flaws?
Cloning alone does not expose you, because git clone does not copy a remote repository's local .git/config. The advisories say an attacker needs the crafted .git directory to reach disk another way, naming archives, shared folders and CI artifacts. One advisory adds that for the promisor lazy-fetch path a plain, complete repository on disk is enough to trigger execution.
Do read-only mcp-server-git tools trigger the command execution?
Read-only mcp-server-git tools trigger two of the paths. The promisor advisory reports git_show, git_diff and git_branch --contains starting a lazy fetch that runs the attacker's program, and the empty-driver-name advisory reports a command running during git_status. A separate moderate advisory uses git_diff and git_diff_unstaged to read files outside the --repository boundary, without execution.
Were CVEs assigned to the mcp-server-git advisories?
No CVE covers any of the eight advisories in the v2.5.0 batch. Each GitHub advisory records the identifier as not known, and one reporter notes asking GitHub, as the CNA, to assign one if the maintainers confirmed the issue. Teams that track exposure by CVE will not see these, so track the GHSA identifiers and the package versions instead.

Sources 8 links, all fetched

  1. 1github.comRelease v2.5.0
  2. 2github.comPromisor Lazy Fetch
  3. 3github.comMerge Maintenance Hook
  4. 4github.comConfig Include on Merge
  5. 5github.comEmpty Driver Name
  6. 6github.comSubmodule Config
  7. 7github.comIndex Path Traversal
  8. 8github.comFilesystem Symlink Race