{"id":"CVE-2026-27735","aliases":["CVE-2026-27735","GHSA-vjqx-cfc4-9h6v","PYSEC-2026-2630"],"related":[],"kind":"vulnerability","state":"published","title":"mcp-server-git : Path traversal in git_add allows staging files outside repository boundaries","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.\n\nmcp-server-git thanks https://hackerone.com/0dd-g for reporting and contributing the fix.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-02-25T23:45:52.077Z","modified":"2026-07-13T16:42:29.302Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"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"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"< 2026.1.14","status":"affected"}],"vendor":"modelcontextprotocol","product":"servers","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2026.1.14"}],"ecosystem":"PyPI","package":"mcp-server-git","purl":"pkg:pypi/mcp-server-git","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2026.1.14"}],"vendor":"lfprojects","product":"model_context_protocol_servers","cpe":"cpe:2.3:a:lfprojects:model_context_protocol_servers:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2026.1.14"}],"ecosystem":"PyPI","package":"mcp-server-git","purl":"pkg:pypi/mcp-server-git","source":"pysec"}],"references":[{"url":"https://github.com/modelcontextprotocol/servers/security/advisories/GHSA-vjqx-cfc4-9h6v","tags":["patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/modelcontextprotocol/servers/pull/3164","tags":["issue-tracking","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-27735","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/modelcontextprotocol/servers/commit/862e717ff714987bd5577318df09858e14883863","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/modelcontextprotocol/servers","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/mcp-server-git","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-vjqx-cfc4-9h6v","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-02-26T17:04:33.296Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-27735","url":"https://www.cve.org/CVERecord?id=CVE-2026-27735","licence":"CVE Terms of Use","modified":"2026-02-26T17:04:59.103Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vjqx-cfc4-9h6v","url":"https://github.com/advisories/GHSA-vjqx-cfc4-9h6v","licence":"CC-BY-4.0","modified":"2026-07-13T16:42:29.302Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-27735","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-27735","licence":"Public domain","modified":"2026-06-17T10:27:34.540Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2630","url":"https://osv.dev/vulnerability/PYSEC-2026-2630","licence":"CC-BY-4.0","modified":"2026-07-13T16:32:13.804Z"}],"updatedAt":"2026-11-25T22:59:14.917Z","epss":{"score":0.00556,"percentile":0.4006,"date":"2026-11-30T12:00:22.000Z"}}