mcp-server-git: a filter defined in an include file that a git command creates is run by that command's own child processes (git_commit auto
GHSA-vv37-2wgg-9rq6 · published 2026-12-05
- Severity
- High
- CVSS score
- Not scored
- Chance of exploitation (EPSS)
- No CVE
- Fixed in
- 2026.12.5
This is a residual of GHSA-9vjp-x34c-xg6v, at 2026.11.27 (tag v2.6.0, commit b502fd9f, which was also main when it was verified on 2026-11-28). harden_repo lists the drivers a repository's configuration defines and empties each by name in the environment. Since 2026.11.18, _rewrite_tree lists them again after a git command that writes the working tree, because that command may have created a file that .git/config includes. The second listing runs when the command has exited. Some git commands are several processes. They write the tree and then start child git processes, and each child reads the configuration from the start. …
Upgrade mcp-server-git to 2026.12.5 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
The two triggers share one cause: a configuration listing taken before a tree write cannot cover what child processes of that write read afterwards. Passing -q to stash apply, or pinning pull.twohead, might suppress the observed paths but would not address the cause. One conservative mitigation: in harden_repo, refuse to operate when a repository-scope include.path or includeIf.*.path points at a file that is missing or lies inside the working tree. That would refuse both tested fixtures when the tool opens the repository, before either requested write begins. …
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| mcp-server-git | PyPI | <= 2026.11.27 | 2026.12.5 |
- CriticalMCP Path Traversal Allows Full-Filesystem Read and JWT Secret Exfiltration Leading to Account Takeoverlangflow, langflow-base
- CriticalVibe-Trading FastAPI endpoints permit unauthenticated access, file upload, and an RCE chainvibe-trading-ai
- Critical@zereight/mcp-gitlab: Unauthenticated arbitrary file read via `upload_markdown` enables PAT exfiltration and full account takeover@zereight/mcp-gitlab
- CriticalFlowise RCE via SQL Database Chain Nodeflowise, flowise-components
- CriticalLangroid: SQLChatAgent dangerous-function blocklist can be bypassed with quoted or schema-qualified pg_read_file callslangroid
- Criticalfast-mcp-telegram: Bearer token path traversal bypasses reserved Telegram session protectionfast-mcp-telegram
- Criticalmcp-server-git runs a repo's gpg.program via git_merge and git_branchmcp-server-git
- Criticalgit_add runs submodule filter commands when gitlink mode is not 160000mcp-server-git
- Criticalmcp-server-git: unexpandable sparse index lets submodule filter drivers runmcp-server-git
- Criticalgit: harden_repo ignores core.worktree, so repository-defined filters runmcp-server-git
- Criticalmcp-server-git --repository: checks a bare repo but runs a hidden .git's filtermcp-server-git
- Highgit: index entries under a symlink leak files outside --repositorymcp-server-git
The impact, patch and workaround text comes from the advisory, shortened (published by the MCP reference servers project). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.