VYPR
Medium severity6.5NVD Advisory· Published Feb 26, 2026· Updated Apr 14, 2026

CVE-2026-27735

CVE-2026-27735

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 packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
mcp-server-gitPyPI
< 2026.1.142026.1.14

Affected products

1

Patches

1
862e717ff714

Merge pull request #3164 from 0dd/fix-git-add-validation

https://github.com/modelcontextprotocol/serversOla HungerfordJan 4, 2026via ghsa
1 file changed · +2 1
  • src/git/src/mcp_server_git/server.py+2 1 modified
    @@ -132,7 +132,8 @@ def git_add(repo: git.Repo, files: list[str]) -> str:
         if files == ["."]:
             repo.git.add(".")
         else:
    -        repo.index.add(files)
    +        # Use '--' to prevent files starting with '-' from being interpreted as options
    +        repo.git.add("--", *files)
         return "Files staged successfully"
     
     def git_reset(repo: git.Repo) -> str:
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.