mcp-server-git: nested gitdir file bypasses --repository confinement
CVE-2026-134465 · GHSA-w766-5x43-whvw · published 2026-10-28 · updated 2026-11-24
- Severity
- Medium
- CVSS score
- 5.3
- Chance of exploitation (EPSS)
- Not scored
- Fixed in
- 2026.10.28
- Exploitation Public proof of concept
- Automatable No
- Technical impact Partial
- CISA SSVC
A caller who meets the preconditions can cross the configured --repository boundary. Confirmed impacts are disclosure of committed files and modification of refs in another repository. Other exposed Git tools may perform additional reads or writes on that outside repository with the server's OS privileges. The demonstrated branch creation is an integrity violation; this report does not claim arbitrary host-file write or code execution.
Upgrade mcp-server-git to 2026.10.28 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.
In confined mode, do not allow Git repository discovery to escape the explicitly allowed repository: Prefer rejecting .git file indirection by default when --repository is configured, unless there is a documented safe policy for it. After opening, validate the resolved repository identity and relevant paths before every operation. Do not rely solely on validating the original repo_path string. Account explicitly for legitimate linked worktrees and separate git directories. …
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| mcp-server-git | PyPI | < 2026.10.28 | 2026.10.28 |
- 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.