mcp-server-git: nested gitdir file bypasses --repository restriction
- State
- Published
- Severity
- 5.8 Medium
- Published
- Nov 23, 2026
- Updated
- Nov 24, 2026
- Reserved
- Nov 21, 2026
Description
In mcp-server-git before 2026.10.28, the --repository restriction can be bypassed through a nested directory that contains a .git file with a gitdir pointer to a repository outside the allowed path. A caller who can invoke the server's tools, place such a file in the allowed tree, and knows the outside repository's path can read committed content from that repository and create branches in it.
| Product | Versions |
|---|---|
| mcp-server-git Anthropic | before 2026.10.28 Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 4.0 | 5.8 Medium | Anthropic |
Weaknesses
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.