mcp-server-git : Path traversal in git_add allows staging files outside repository boundaries
CVE-2026-27735 · GHSA-vjqx-cfc4-9h6v · published 2026-02-26
- Severity
- Medium
- CVSS score
- 6.4
- Chance of exploitation (EPSS)
- 0.34%
- Fixed in
- 2026.1.14
- Exploitation No known exploitation
- Automatable No
- Technical impact Partial
- CISA SSVC
In mcp-server-git versions prior to 2026.1.14, the git_add tool did not validate that file paths provided in the files argument were within the repository boundaries. The tool used GitPython's repo.index.add(, which did not enforce working-tree boundary checks for relative paths. The fix in PR #3164 switches to repo.git.add(), which delegates to the Git CLI and properly rejects out-of-tree paths. Users are advised to upgrade to 2026.1.14 or newer to remediate this issue.
Upgrade mcp-server-git to 2026.1.14 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.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| mcp-server-git | PyPI | < 2026.1.14 | 2026.1.14 |
- CriticalMCP Path Traversal Allows Full-Filesystem Read and JWT Secret Exfiltration Leading to Account Takeoverlangflow, langflow-base
- 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 Toolbox HTTP tool path parameters allow traversal to unintended endpointsgithub.com/googleapis/mcp-toolbox
- Mediummcp-server-git's unrestricted git_init tool allows repository creation at arbitrary filesystem locationsmcp-server-git
- Mediummcp-server-git argument injection in git_diff and git_checkout functions allows overwriting local filesmcp-server-git
- Mediummcp-server-git has missing path validation when using --repository flagmcp-server-git
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.