CVE-2026-27735 mcp-server-git : Path traversal in git_add allows staging files outside repository boundaries

Medium 6.4 Published Updated

Attackers can stage files outside the repository boundaries via path traversal in the git_add tool of the MCP Git server.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-27735?

CVE-2026-27735 is a medium-severity path traversal vulnerability in modelcontextprotocol servers, published on 25 Feb 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-22

Which versions are affected by CVE-2026-27735?

3 open source packages ship an affected version, including mcp-server-git. It affects 1 product.

PackageAffectedFixed in
mcp-server-git PyPIAll versions2026.1.14
mcp-server-git PyPIAll versions2026.1.14
mcp-server-git PyPIAll versions2026.1.14

Products include Lfprojects Model Context Protocol Servers.

How do I fix CVE-2026-27735?

Upgrade mcp-server-git to 2026.1.14 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-27735 being exploited?

There is no known exploitation of CVE-2026-27735 in the wild and no public exploit code.

Sources

Also known as GHSA-vjqx-cfc4-9h6v, MINI-mch8-8h85-3j5v, PYSEC-2026-2630.

Is CVE-2026-27735 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free