{"question":"Our coding assistant uses the official mcp-server-git server, sometimes on repositories we cloned from outside the team. Which version fixes the advisories published in November 2026, can a repository's own configuration still make the server run programs, and what else should we change besides upgrading?","slug":"which-mcp-server-git-version-fixes-the-november-2026-advisories-and-can-a-repositorys-own-config-still-run-programs","url":"https://www.rightshold.com/answers/which-mcp-server-git-version-fixes-the-november-2026-advisories-and-can-a-repositorys-own-config-still-run-programs","short_answer":"Upgrade to mcp-server-git 2026.11.27, published on PyPI on November 27, 2026. Two releases of the official MCP reference servers fixed twelve advisories in this server in nine days. v2.5.0 (November 18, 2026, mcp-server-git 2026.11.18) covered six: a git_merge that ended in Git's automatic maintenance and ran a repository's own gc.recentObjectsHook, lazy fetching from a promisor remote that started a program the repository named, filter and merge drivers that appeared after a checkout or merge wrote a config include, a driver with an empty name, a crafted .git/index that let read-only diff tools return files outside --repository, and submodules that ran their own drivers. v2.6.0 (November 27, 2026) added six more advisories and finished one v2.5.0 had left open, including Git LFS running programs named in a repository's .git/config, a --repository root that could be retargeted through a .git pointer, git_remote returning a credential, and repo_path expanding environment variables into an error message. Most of the high-severity ones share a root: Git reads settings from the repository itself, so a repository someone else prepared can name programs that run with the server's privileges. The upgrade closes the known paths; it doesn't make an untrusted repository safe to hand to the server without isolation.","checklist":["Check the installed version: mcp-server-git 2026.11.18 and earlier are affected by the v2.6.0 advisories, and 2026.11.11 and earlier by the v2.5.0 ones too. 2026.11.27 is the fix for both.","If your client launches the server through uvx without a pinned version, restart it so it resolves the new release; a cached copy stays on the old one until it's refreshed.","Run the server with --repository set to the one repository it should touch. Several fixes only apply under --repository, and v2.6.0 now refuses a root whose .git file names a Git directory somewhere else.","Treat a repository from outside your team as code you're about to run. Open it in a container or VM with the server's own account, not on a laptop that holds your SSH keys and cloud credentials.","If you use Git LFS, note that the official Docker image installs it system-wide. 2026.11.27 empties the LFS program settings at repository scope and turns off LFS downloads; check that your own image is on that version too.","Keep credentials out of remote URLs and url.<base>.insteadOf rules in the server account's Git config. v2.6.0 fixed a case where git_remote returned such a credential; not having one there is the stronger fix.","Don't run the server with secrets in its environment. Before 2026.11.27 a repo_path containing $NAME could print an environment variable's value back in an error.","If you also run the reference filesystem or memory servers from npm with a date version (2025.x or 2026.x), install 2.4.1 and 2.2.2 explicitly. The release notes say package managers rank those semantic versions below every date version and won't offer them as an upgrade."],"sections":[{"heading":"What the November 2026 mcp-server-git advisories cover","points":["The v2.5.0 release notes of the modelcontextprotocol/servers repository (November 18, 2026) list six mcp-server-git fixes, published the same morning as GitHub security advisories. Four are rated high with a CVSS score of 7.8: GHSA-h2g3-rwxm-xfm3 (a successful git_merge, a fast-forward included, ended in git maintenance run --auto, whose garbage collection runs the commands the repository's gc.recentObjectsHook names), GHSA-87qg-cmw8-jc5m (a promisor remote's uploadpack or core.sshCommand setting started a program when a read-only tool needed an object that wasn't on disk), GHSA-9vjp-x34c-xg6v (a config include created by the merged branch ran a command during git_merge or the abort after a conflict) and GHSA-pm7p-vphh-2cg7 (a filter or merge driver with an empty name). GHSA-8wv7-r664-7594 covers submodules running their own diff and textconv drivers, and GHSA-r2q8-f657-4r56 (medium) a crafted .git/index that made git_diff_unstaged and git_diff return a file outside --repository.","The v2.6.0 notes (November 27, 2026) list six more advisories and complete one from v2.5.0. GHSA-6663-fm5v-gqm5 (high, 7.8): with Git LFS installed, the read-only git_status and the diff, add, checkout and merge tools could run programs that LFS settings in the repository's .git/config name. GHSA-3whj-m8jj-x97q: a --repository root whose .git file or commondir named another Git directory let git_show serve another repository's content. GHSA-wvv2-676g-r57j (5.3): a tab in a remote name or a prefixed URL slipped past git_remote's redaction and returned a credential from the user's insteadOf rules. GHSA-f33v-89w7-f9vc: GitPython expanded $NAME in repo_path and the not-found error printed the result. GHSA-5pwg-5xfw-x322: an alternates file rewritten between the check and the read let git_show return an object from another repository. GHSA-qf89-h82f-h5r5 (low): a non-fast-forward merge replaced an ignored file such as .env. The --repository check is now also repeated after a checkout or merge writes the working tree, which v2.5.0 had left open."]},{"heading":"Why a repository's own configuration keeps running programs","points":["Git reads configuration from the repository it's working in: hooks, filter and merge drivers, fetch programs, LFS settings, submodule settings, include files. Many of those name a program to run. When a server runs Git on a repository someone else prepared, each of those settings is a way to start a program with the server's privileges, even from a tool documented as read-only, like git_status or git_diff.","The fixes in these two releases work by switching off or emptying each such setting for every Git command the server runs: automatic maintenance, lazy fetching, LFS program keys, drivers with any name, submodule drivers. That closes the paths found so far. The release notes also say the --repository confinement wasn't repeated after a write until v2.6.0. Expect more of this class: the safe assumption is that a repository from outside is untrusted input to Git itself.","So the durable control is where the server runs, not which settings it empties. Give it a container or VM with a scratch home directory, no SSH agent, no cloud credentials in its environment, and only the one repository mounted, and set --repository to that path."]},{"heading":"What to change besides the upgrade","points":["Pin the version you've reviewed instead of resolving the newest release each launch, and re-read the release notes before moving the pin. The servers repository now publishes a release ledger and per-package notes with each release, which makes the review short.","Ask for a human's approval before tools that write the working tree (git_checkout, git_merge, git_add, git_commit) run on a repository the team didn't create. Most of the high-severity paths above ran during those tools, or during the abort after a conflicted merge.","If an affected version worked on a repository from outside, look at what the server's account could reach: its shell profile, its Git config, files in its home directory, and any tokens in its environment. Rotate credentials that account held."]}],"checks":[],"ask_rightshold":{"start":"https://www.rightshold.com/start?ref=seo","mcp_endpoint":"https://www.rightshold.com/mcp","ask":"Before my coding assistant runs git_merge through mcp-server-git on a repository we cloned from outside the team, ask me to approve that exact call, with the repository path and branch in the request.","mcp_call":{"tool":"request_human_approval","arguments":{"action":{"tool":"git_merge","mcp_server":"mcp-server-git","server_version":"2026.11.27","repo_path":"/work/<cloned repository>","source_branch":"<branch to merge>"},"summary":"Merge a branch in a repository cloned from outside the team, through mcp-server-git","expires_in_minutes":30}},"also":["Needs your API key. The action is hashed, and you decide once with decide_human_approval (approve or deny); the decision is a signed, timestamped receipt. The token works once.","It doesn't check your server version, inspect the repository's Git config or stop a call your client sends straight to mcp-server-git. It only covers calls your agent or harness routes through it first, so upgrade and isolate the server as well."],"scope":"Rightshold isn't affiliated with the Model Context Protocol project or Anthropic. It doesn't scan MCP servers, repositories or client settings, and an approval record isn't a finding that a call is safe. Advisory details are as published in the modelcontextprotocol/servers v2.5.0 (November 18, 2026) and v2.6.0 (November 27, 2026) release notes and the GitHub security advisories they link, and release dates as listed on PyPI, all read November 27, 2026; advisories get updated, so confirm fixed versions on the linked pages."},"sources":[{"title":"modelcontextprotocol/servers release v2.6.0 (November 27, 2026): security fixes for mcp-server-git 2026.11.27, server-memory 2.2.2, mcp-server-fetch 2026.11.27 and server-filesystem 2.4.1","url":"https://github.com/modelcontextprotocol/servers/releases/tag/v2.6.0"},{"title":"modelcontextprotocol/servers release v2.5.0 (November 18, 2026): security fixes for mcp-server-git 2026.11.18, server-filesystem 2.4.0 and server-everything 2.3.1","url":"https://github.com/modelcontextprotocol/servers/releases/tag/v2.5.0"},{"title":"GitHub Advisory GHSA-6663-fm5v-gqm5: mcp-server-git runs programs named by a repository's own .git/config through the Git LFS filter","url":"https://github.com/modelcontextprotocol/servers/security/advisories/GHSA-6663-fm5v-gqm5"},{"title":"GitHub Advisory GHSA-h2g3-rwxm-xfm3: git_merge runs gc.recentObjectsHook from the repository's own config","url":"https://github.com/modelcontextprotocol/servers/security/advisories/GHSA-h2g3-rwxm-xfm3"},{"title":"GitHub Advisory GHSA-wvv2-676g-r57j: git_remote credential redaction bypass","url":"https://github.com/modelcontextprotocol/servers/security/advisories/GHSA-wvv2-676g-r57j"},{"title":"PyPI: mcp-server-git release history","url":"https://pypi.org/project/mcp-server-git/#history"}],"related":[{"title":"Can opening an untrusted repository with the MCP Git server run code on your machine?","url":"https://www.rightshold.com/answers/can-opening-an-untrusted-repository-with-the-mcp-git-server-run-code-on-your-machine"},{"title":"Which versions of the official MCP Git, filesystem and fetch servers are safe to run?","url":"https://www.rightshold.com/answers/which-versions-of-the-official-mcp-git-filesystem-and-fetch-servers-are-safe-to-run"},{"title":"Sandboxing a local stdio MCP server to only the files and hosts it needs","url":"https://www.rightshold.com/answers/how-to-sandbox-a-local-stdio-mcp-server-to-only-the-files-and-hosts-it-needs"},{"title":"Pinning MCP server versions and reviewing changes before you upgrade","url":"https://www.rightshold.com/answers/how-to-pin-mcp-server-versions-and-review-changes-before-upgrading"}],"computed_from":"Curated guidance; license verdicts computed from Rightshold's license profiles at render time. Not legal advice.","updated":"2026-11-27"}