Rightshold™ Sign up
Rightshold is live — the trust layer for AI agents.Launched November 23, 2026.Evidence Delivery$99 / 30 days · Offers are open — review the exact terms and the payment options shown on the service page before accepting.No token, everany ‘Rightshold token’ is not ours

Answers · MCP security

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?

Last updated

TL;DR: 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.

What should I check, step by step?

1. 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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.

What do the November 2026 mcp-server-git security advisories cover?

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.

Why can a Git repository's own configuration make an MCP Git server run programs?

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.

What should you change besides upgrading mcp-server-git?

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.

How do I ask Rightshold about this (free, no key)?

Add the MCP server https://www.rightshold.com/mcp to Claude, Cursor, ChatGPT, Grok or VS Code, then 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.”

One-click setup

{
  "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
  }
}

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.

What are the sources?

Related

Not legal advice. JSON · Markdown · All answers

Get a free API key in one call

No card and no email needed. 100 free credits; the license and policy checks stay free without a key.

curl -s -X POST https://www.rightshold.com/v1/accounts/signup -H "Content-Type: application/json" -d '{"accept_terms":true}'
export RIGHTSHOLD_API_KEY=rs_...   # the api_key from the reply (shown once)
curl -s https://www.rightshold.com/v1/licenses/check -H "Authorization: Bearer $RIGHTSHOLD_API_KEY" \
  -H "Content-Type: application/json" -d '{"license":"MIT","intended_use":{"commercial_use":true}}'