Skip to content
Two harden_repo flaws in MCP git server let repositories run commands via git drivers

Two harden_repo flaws in MCP git server let repositories run commands via git drivers

First seen 21 Nov 2026, 20:17 UTC •

Article Content

Browse articles
ThreatCluster AI
ThreatCluster •November 21, 2026 at 20:17 UTC
  • •Repository-defined git filter and merge drivers can execute commands through the MCP git server's read-only and merge tool calls, per the advisories.
  • •The first flaw uses a missing [include] path so drivers are not blanked at open time and are later triggered during git merge --abort.
  • •The second flaw affects drivers with empty names (e.g. [filter ""]) because the detection pattern never matches them, per the second advisory, which cites version 2026.11.11.
  • •The advisories describe the affected server as running commands as the user running the server.
  • •No CVE identifiers, patches or in-the-wild exploitation are mentioned in the provided advisory text.

Two GitHub security advisories for the modelcontextprotocol/servers git server describe flaws in its harden_repo defence, which is meant to blank repository-defined filter and merge drivers so a repository cannot run programs. The first advisory (GHSA-9vjp-x34c-xg6v) says harden_repo reads drivers only once when a repository is opened, so a repository can use an [include] pointing to a file that does not yet exist; git silently ignores the missing include, nothing is blanked, and a later git_merge that adds that file brings in a filter definition that then runs when git merge --abort restores the repository. The advisory states the tool still reports that the merge was aborted and the repository is unchanged. The second advisory (GHSA-pm7p-vphh-2cg7) says the pattern used to collect driver names requires at least one character between dots, so drivers with an empty name, written as [filter ""], are never blanked; .gitattributes can select them with filter= or merge=. It says this affects version 2026.11.11 and that a repository can run a command of its choosing, as the user running the server, from a read-only tool call. The advisories describe the fix approach as sound apart from the pattern. No CVE identifiers, patch versions or exploitation reports appear in the provided text, and both are published as GitHub advisories on 2026-11-21.

Start a free Starter trial for enhanced analysis

Ask AI about this cluster

Updated just now How this analysis works

Timeline

2026-11-21
Advisory GHSA-9vjp-x34c-xg6v published
GitHub advisory describes harden_repo bypass via a missing [include] path triggering a driver during git merge --abort.
github.com
2026-11-21
Advisory GHSA-pm7p-vphh-2cg7 published
GitHub advisory says the driver-name pattern misses empty-named drivers, which affects version 2026.11.11 and above.
github.com

More articles in this cluster (2)

Common questions

Am I affected if I run the MCP git server on untrusted repositories?
The second advisory cites version 2026.11.11 as affected and the first describes the include bypass for repositories with a [include] path to a missing file. Check your server version and whether you open repositories you do not control.
Is there a known exploit in the wild?
The provided advisories describe the flaws and their mechanics but do not report exploitation or proof-of-concept use.
What should defenders do first?
The advisory text provided does not include a fixed version number; monitor the modelcontextprotocol/servers advisories for patch details and avoid opening untrusted repositories with the affected server in the meantime.