mcp-server-git: git_show can read outside --repository after a concurrent alternates rewrite
GHSA-5pwg-5xfw-x322 · published 2026-11-27
- Severity
- Medium
- CVSS score
- Not scored
- Chance of exploitation (EPSS)
- No CVE
- Fixed in
- 2026.11.27
The race crosses the access boundary that --repository promises and makes git_show disclose Git objects stored in a separate repository that the server process can read. The ordinary caller needs access to both tools and must be able to write within the admitted repository, but does not need direct access to the sibling repository. The proof supplied a known sibling-only blob ID and returned that blob; it did not demonstrate enumeration or discovery of unknown object IDs. In a deployment, the caller must know or obtain the ID of the sensitive object it requests. …
Upgrade mcp-server-git to 2026.11.27 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.
Prevent object resolution from observing an alternates file that can change after validation. A robust fix could reject or make Git metadata paths such as .git/objects/info/alternates unwritable through the Filesystem server, and bind Git object access to a validated immutable object-store configuration for the duration of each operation. Rechecking the file without preventing concurrent mutation leaves the same check/use window. Add a regression test that races registered write_file calls against registered git_show calls and asserts that a sibling-only blob is never returned; retain tests showing stable external alternates are rejected.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| mcp-server-git | PyPI | < 2026.11.27 | 2026.11.27 |
- 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.