Skip to content
NLEN
Illustration: OpenAI pipeline found 948 Linux root bugs in one run: what autonomous bug hunting means

mcp-server-git: a Git configuration flaw let read-only tools start programs

By Ivo Donker · — text: Claude (AI)

What is wrong with mcp-server-git? The reference server that gives AI agents access to Git repositories ran Git without neutralizing the repository's own configuration. A malicious .git/config could therefore start a program during an ordinary git_status call, with the server's privileges. All versions before 2026.11.11 are affected; update to 2026.11.11 or later. There is no other workaround.

We read the security advisory GHSA-6hqx-gqrx-c5r2 on GitHub ourselves. The topic was also in the trending briefing of November 16.

What happened

The project behind the MCP reference servers published the advisory on November 11, 2026. mcp-server-git is the Python package that lets an agent such as Claude Code, Codex or a custom MCP client look inside a repository: status, diffs, log, commits. According to the advisory, the only setting the server overrode was core.quotepath=false. Everything else came from the repository.

That matters because Git treats some settings as commands. core.fsmonitor names a program Git starts during git status; diff.external does the same for a diff. The advisory lists git_status and the two diff tools (git_diff_unstaged and git_diff_staged) as triggers. The program runs under the server's account, with access to its environment variables (including keys the client passes in) and the file system, and without any approval prompt.

Details

Details
ItemAccording to the advisory
Packagemcp-server-git (pip)
Affectedall versions before 2026.11.11 (tested on 2026.10.28 and 2026.11.4)
Fixed in2026.11.11 (pull request #5514)
SeverityHigh, CVSS 3.1 score 7.8 (local, user interaction required)
CVEnone
WeaknessesCWE-94 and CWE-829

One important limit: the malicious configuration has to arrive with an intact .git directory, for example through an archive, a backup, a shared folder or a copied workspace. A normal git clone or a source ZIP from GitHub does not carry .git/config. The report came in through Anthropic's HackerOne program; the reporter is not named.

The fix sets fixed overrides on every Git command: core.fsmonitor off, an empty hooks path, no signing, no submodule recursion and cat as the pager. Filter and merge drivers defined by the repository are ignored and diffs run with --no-ext-diff --no-textconv. The server now refuses Git versions older than 2.31.

What this means

The flaw shows that "read-only" means little for agent tools as long as the underlying program executes its own configuration. Letting a coding agent open a folder that came from someone else gives that folder a say in what runs on your machine. The same idea is behind the decision in Codex CLI 0.169 to switch off project configuration in untrusted folders.

In practice: update mcp-server-git, also when it runs through uvx or a container, and check which version your client actually starts. Until then, only open repositories whose .git directory you trust. More on these risks is in our overview of AI and cybersecurity, in our overview of MCP servers and agent tooling and in the Cursor incident with a leaked key.

What we did not check

We did not reproduce the flaw and did not read the fix in pull request #5514 line by line. News roundups report more flaws in other reference servers in the same release; we did not read those advisories ourselves, so they are not in this article.

Checked on November 16, 2026.

This article was written with AI (Claude) and checked against the source below.

Sources