Configured Git repository root can be retargeted through a .git pointer
GHSA-3whj-m8jj-x97q · published 2026-11-27
- Severity
- Medium
- CVSS score
- Not scored
- Chance of exploitation (EPSS)
- No CVE
- Fixed in
- 2026.11.27
This is CWE-284 (Improper Access Control): a caller-controlled .git pointer makes --repository disclose committed data from a different repository that the server account can read. The demonstrated consequence is confidentiality loss across repository authorities; arbitrary host-file reads, writes, code execution, and availability impact were not demonstrated. The conservative CVSS 3.1 base score is 5.9 Medium: . AV:L and PR:L reflect the local project contributor or account that can supply the configured root's .git file, AC:L reflects that no timing race is needed once that content is present, and UI:R reflects the normal MCP request. …
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.
Bind the configured repository identity to the Git metadata selected at startup instead of proving the boundary by reopening the same pathname after Git resolves it. For a regular .git file, resolve git_dir, common_dir, and the working tree and reject any external directory unless it satisfies the explicit linked-worktree relationship under the main repository's .git; do not let a self-consistent attacker-controlled pointer establish its own allowlist. A regression test should configure a root containing an outside gitdir: pointer, assert that git_show rejects HEAD:secret.txt, retain a valid linked-worktree test, and keep the direct sibling and regular-root controls.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| mcp-server-git | PyPI | < 2026.11.27 | 2026.11.27 |
- CriticalMarimo: Pre-Auth Remote Code Execution via Terminal WebSocket Authentication BypassmarimoExploited
- CriticalLangflow CORS misconfiguration enables Account Takeover and RCElangflowExploited
- HighLiteLLM: MCP Authentication Bypass via OAuth2 Passthrough FallbacklitellmExploited
- HighLangflow: IDOR Vulnerability in `/api/v1/responses` Endpoint Allows Authenticated Attackers to Access Another User's FlowlangflowExploited
- CriticalJupyter MCP Server: Host-header spoof bypasses the CVE-2026-77359/GHSA-9x8x-crjq-g64h fixjupyter-mcp-server
- CriticalUnauthenticated Superuser Token Issuance via Default-Enabled auto_login Endpointlangflow
- 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.