A hidden .git file walked past the mcp-server-git fence. The patch is out.
By Lior AharonovFounder, 7IT Solutions ·
What happened
On 28 October 2026 the MCP servers repo published advisory GHSA-w766-5x43-whvw for mcp-server-git, rated Moderate (CVSS 5.3). Run with --repository, a nested folder holding a .git file could point Git at a repository outside the allowed one. Versions before 2026.10.28 are affected.
Why it matters
The --repository flag is the fence you hand an agent: stay inside this repo. The path check passed the nested folder, and Git followed the redirect out. The reporter read committed files and created a branch outside the fence.
What to do
If you run mcp-server-git with --repository, upgrade to 2026.10.28 today and look for stray .git files inside the allowed folder.

My take
Lior Aharonov
Founder, 7IT Solutions
Confinement is only as good as the last thing you check. Check the repository Git opens, not the path you were handed.
Sources
| GHSA-w766-5x43-whvw: mcp-server-git nested gitdir bypass | github.com |
| mcp-server-git releases on PyPI | pypi.org |
Researched with AI tools; every fact is checked against the linked sources.