MCP's Official Git Server Could Run Programs From a Cloned Repo's Own LFS Config — v2.6.0 Closes Eight Flaws
The Model Context Protocol reference servers' v2.6.0 release fixes a high-severity flaw where Git LFS let a cloned repository run its own programs through mcp-server-git, even via the read-only git_status tool, plus seven other fixes across git, memory and fetch.
The Model Context Protocol’s reference mcp-server-git implementation — the tool many coding-agent harnesses wire up to give agents git access — shipped a fix on November 27, 2026 for a high-severity flaw that let a cloned repository’s own configuration run arbitrary programs under the server’s privileges. The fix landed in v2.6.0 of the modelcontextprotocol/servers repository, alongside seven other security fixes across three servers.
The LFS problem: a read-only tool call that wasn’t
Git LFS (Large File Storage) supports “clean” and “smudge” filters, plus custom transfer agents, that are configured as programs to run. The MCP git server trusted the LFS filter from the user’s own global or system Git configuration — but Git LFS itself then reads further settings from the repository’s own .git/config, including keys like lfs.extension.<name>.clean, lfs.extension.<name>.smudge, lfs.customtransfer.<name>.path, and lfs.standalonetransferagent. A hostile repository’s config could look like this:
[lfs "customtransfer.evil"]
path = /tmp/exfil.sh
args =
[lfs]
standalonetransferagent = evil
Because the official Docker image runs git lfs install --system to install LFS system-wide, any server with LFS present would honor those repository-supplied program paths. The advisory, GHSA-6663-fm5v-gqm5, is rated high severity. Notably, it didn’t require a write tool to trigger: git_status — described in the server’s own documentation as read-only — could trigger it, along with git_diff_unstaged, git_diff, git_add, git_checkout and git_merge.
That matters for how agentic coding tools are actually used. An agent that clones or opens an untrusted repository and simply checks its status, as almost every agent does at the start of a session, could run a program the repository’s author chose, with whatever privileges the MCP server process has.
How the fix works
The merged fix, in pull request #5672, closes the class two ways rather than patching a single code path:
- Every repository-scope
lfs.extension.<name>.clean/.smudge,lfs.customtransfer.<name>.path/.args, andlfs.standalonetransferagentkey is overridden with an empty value at call time, the same way filter and merge drivers are already neutralized. A checked-out submodule’s keys are emptied too. The user’s own global or system LFS settings are left untouched. - LFS downloads are turned off entirely (
GIT_LFS_SKIP_SMUDGE=1), because a download alone can runcore.sshCommand,credential.helper, orcore.askpassfor an endpoint the repository chooses — settings no single config key can safely pin closed.
The maintainers explicitly rejected disabling the LFS filter outright, since that would make every real LFS file show as modified in git_status and cause git_add to stage raw pointer content as if it were the real file. The trade-off that shipped instead: git_checkout and git_merge now write LFS files as pointer files, and a separate git lfs pull restores the real content afterward — a visible behavior change documented in the server’s README.
Everything else in v2.6.0
The LFS fix was the headline, but v2.6.0 bundles seven more fixes. The release notes and the v2.6.0 tracking issue list:
| Server | Issue | Fix |
|---|---|---|
| mcp-server-git | GHSA-6663-fm5v-gqm5 | LFS-named programs from repo config (above) |
| mcp-server-git | GHSA-3whj-m8jj-x97q | --repository root could be retargeted via a .git pointer to another repo |
| mcp-server-git | GHSA-wvv2-676g-r57j | git_remote leaked a credential via a crafted remote name or URL |
| mcp-server-git | GHSA-f33v-89w7-f9vc | repo_path expanded environment variables, leaking them in errors |
| mcp-server-git | GHSA-5pwg-5xfw-x322 | A concurrent alternates-file rewrite let tools read objects outside --repository |
| mcp-server-git | GHSA-qf89-h82f-h5r5 | git_merge could silently overwrite ignored files such as .env |
| server-memory | GHSA-48j5-hj63-c82c | A symlink race on save could change permissions of a file outside the memory path |
| mcp-server-fetch | GHSA-g7v6-hfx3-8rv6 | robots.txt matching missed backslash and path-parameter spellings |
The fixed versions are mcp-server-git 2026.11.27, mcp-server-fetch 2026.11.27, @modelcontextprotocol/server-memory 2.2.2, and on Windows @modelcontextprotocol/server-filesystem 2.4.1. One upgrade wrinkle: the TypeScript servers moved from date-based versions (2025.x/2026.x) to semantic versions, so package managers won’t offer 2.2.2 or 2.4.1 as an upgrade from an old date version — install them explicitly, for example npm install @modelcontextprotocol/server-memory@2.2.2.

What to do
If your agent harness — Claude Code, Cursor, or any other MCP client — wires up the reference mcp-server-git, and the host it runs on has Git LFS installed (check the official Docker image specifically, since it installs LFS system-wide), treat this as a required upgrade rather than routine maintenance: pin mcp-server-git to 2026.11.27 or later, and audit any repositories your agents routinely open for unexpected lfs.customtransfer.* or lfs.standalonetransferagent entries in their .git/config. For background on recovering from LFS pointer-file surprises after a checkout, see our Git LFS checkout recovery runbook. This is the second consecutive monthly security release for the reference git server; our coverage of v2.5.0 covered a distinct set of six vulnerabilities fixed two weeks earlier, a pattern worth watching if you run this server unattended.
Sources
- Release v2.6.0 · modelcontextprotocol/servers · GitHub
- [GHSA-6663-fm5v-gqm5] - mcp-server-git: Git LFS runs programs named in a repository's own configuration · Issue #5664 · modelcontextprotocol/servers · GitHub
- fix(git): GHSA-6663-fm5v-gqm5 - Git LFS runs programs named in a repository's own configuration by cliffhall · Pull Request #5672 · modelcontextprotocol/servers · GitHub
- Release v2.6.0 · Issue #5681 · modelcontextprotocol/servers · GitHub
- [GHSA-5pwg-5xfw-x322] - mcp-server-git: a concurrent alternates rewrite lets tools read objects outside --repository · Issue #5669 · modelcontextprotocol/servers · GitHub