6.4medium
mcp-server-git : Path traversal in git_add allows staging files outside repository boundaries
- Severity
- 6.4medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.56% (higher than 40% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-vjqx-cfc4-9h6vPYSEC-2026-2630
Description
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 git_add 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| modelcontextprotocol servers | < 2026.1.14 | CVE List |
| mcp-server-git (PyPI) | before 2026.1.14 | GitHub Advisory Database, PyPA Advisory Database |
| lfprojects model_context_protocol_servers | before 2026.1.14 | NVD |
All scores
| GitHub_M | 6.4medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N |
| NVD | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
| PyPA Advisory Database | Not scored CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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 git_add 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.
GitHub Advisory Database
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. 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.
NVD (es)
Servidores de Protocolo de Contexto de Modelo es una colección de implementaciones de referencia para el protocolo de contexto de modelo (MCP). En versiones de mcp-server-git anteriores a 2026.1.14, la herramienta git_add no validaba que las rutas de archivo proporcionadas en el argumento files estuvieran dentro de los límites del repositorio. Debido a que la herramienta utilizaba repo.index.add() de GitPython en lugar de la CLI de Git, las rutas relativas que contenían secuencias '../' que se resolvían fuera del repositorio eran aceptadas y preparadas en el índice de Git. Se aconseja a los usuarios que actualicen a la versión 2026.1.14 o posterior para solucionar este problema.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-27735 changed 2026-02-26 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-vjqx-cfc4-9h6v changed 2026-07-13 | CC-BY-4.0 |
| NVD | CVE-2026-27735 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-2630 changed 2026-07-13 | CC-BY-4.0 |