CVE-2026-27735: mcp-server-git : Path traversal in git_add allows staging files outside repository boundaries
In mcp-server-git versions prior to 2026.1.14, the gitadd 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. As a result, relative paths containing ../ sequences that resolved outside the repository were accepted and staged into the Git index, potentially allowing sensitive files to be exfiltrated via subsequent commit and push operations. 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.
mcp-server-git thanks https://hackerone.com/0dd-g for reporting and contributing the fix.
Other sources
Model Context Protocol Servers is a collection of reference implementations for the model context protocol (MCP). In mcp-server-git versions prior to 2026.1.14, the gitadd tool did not validate that file paths provided in the files argument were within the repository boundaries. Because the tool used GitPython's repo.index.add() rather than the Git CLI, relative paths containing ../ sequences that resolve outside the repository were accepted and staged into the Git index. Users are advised to upgrade to 2026.1.14 or newer to remediate this issue.
— NVD
Affected Software
Remediation
Patch Available
Event History
Frequently Asked Questions
What is the severity of CVE-2026-27735?
CVE-2026-27735 is considered a high severity vulnerability due to its potential impact on file security within a Git repository.
How do I fix CVE-2026-27735?
To fix CVE-2026-27735, upgrade to mcp-server-git version 2026.1.14 or later.
What is the nature of CVE-2026-27735?
CVE-2026-27735 is a path traversal vulnerability that allows destabilizing the staging process of files outside repository boundaries.
Which versions of mcp-server-git are affected by CVE-2026-27735?
mcp-server-git versions prior to 2026.1.14 are affected by CVE-2026-27735.
What components are impacted by CVE-2026-27735?
The vulnerability primarily affects the git_add functionality within mcp-server-git.