If you give an AI agent mcp-server-git, upgrade it to 2026.11.18 or later today, and don't point it at repos you haven't checked

mcp-server-git: six more ways a repo's own Git config could run commands, fixed in 2026.11.18 · Security incident · GitHub (modelcontextprotocol/servers) · modelcontextprotocol · Nov 18, 2026

What happened

On 18 Nov 2026 the Model Context Protocol servers project shipped v2.5.0, fixing eight vulnerabilities in three reference servers. Most are in mcp-server-git, a week after the core.fsmonitor fix in 2026.11.11: a git_merge could start Git's automatic maintenance and run a command named in the repository's gc.recentObjectsHook; a promisor-remote setting could make a read-only tool launch a program during a lazy fetch; a config include created by a merged branch, or a filter driver with an empty name, could still run a command; a submodule's own configuration could run programs on git_diff, git_checkout and git_add; and a crafted .git/index could make read-only tools return files outside the --repository boundary. The release also fixes @modelcontextprotocol/server-filesystem (2.4.0) and server-everything (2.3.1). Commands run with the MCP server's privileges, including credentials passed in the client's env block.

How to prevent it

Keep MCP servers pinned and updated like any dependency, treat a repository's .git folder and config as untrusted input, and don't pass long-lived API keys into an MCP server's env block unless that server needs them.

Fix prompt for your own AI tool

Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.

I use MCP, which can read web pages, files, emails or tool output. Help me reduce the risk of prompt injection (hidden instructions in content the AI reads). 1) List what my setup can access (files, terminal, browser, MCP servers, email, databases) and what it can do without asking me. 2) Point out the riskiest combinations, e.g. reading untrusted content while also having access to secrets or the ability to send data out. 3) Suggest concrete settings: require approval for commands and network calls, remove MCP servers I don't need, use read-only tokens, and keep the tool updated. 4) Give me a short checklist to follow before opening untrusted repos or documents. Don't change anything until I've approved your plan. Never ask me to paste API keys, passwords or .env contents; tell me where to check them myself.

Why this keeps happening: trusting agents & ai input

An AI agent treats everything it reads as possible instructions: a web page, a README, an email, a code comment or the output of another tool. If that content was written by an attacker, the agent can be steered into running commands, reading files or sending data somewhere it should not.

A quick checklist before you ship

More on this: every trusting agents & ai input story and our related guide.

Tools involved

MCP stories, Claude Code stories, Cursor stories

Related stories

Source: original post on GitHub (modelcontextprotocol/servers) ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.

The Honest Build. Real stories, not hype.

Every week: real stories of what building with AI actually took, the one lesson worth keeping, and the security slip-ups to avoid. Free, unsubscribe anytime. Weekly, every Friday.