Vulnerabilities in pkg:pypi/mcp-server-git
PACKAGECVE-2026-27735 is a MODERATE path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting mcp-server-git libraries in the PyPI ecosystem. The issue involves path traversal in git_add allows staging files outside repository boundaries. Remediation is available by upgrading affected packages to version 2026.1.14.
pkg:pypi/mcp-server-git
Vulnerability advisories affecting package pkg:pypi/mcp-server-git. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-vjqx-cfc4-9h6v | CVE-2026-27735 | MODERATE | mcp-server-git : Path traversal in git_add allows staging files outside repository boundaries |
| GHSA-j22h-9j4x-23w5 | CVE-2025-68145 | MODERATE | mcp-server-git has missing path validation when using --repository flag |
| GHSA-9xwc-hfwc-8w59 | CVE-2025-68144 | MODERATE | mcp-server-git argument injection in git_diff and git_checkout functions allows overwriting local files |
| GHSA-5cgr-j3jf-jw3v | CVE-2025-68143 | MODERATE | mcp-server-git's unrestricted git_init tool allows repository creation at arbitrary filesystem locations |
CVE-2026-27735 at a Glance
How to Fix CVE-2026-27735
To remediate this vulnerability, upgrade all affected mcp-server-git dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install mcp-server-git>=2026.1.14
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show mcp-server-git
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-27735, inspect your installed packages using pip:
pip show mcp-server-git
Analyze the terminal output to locate any version of mcp-server-git in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2026.1.14), your application is affected.
Note: The pip show mcp-server-git command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In mcp-server-git, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-27735 Affected mcp-server-git Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mcp-server-git
|
PyPI |
< 2026.1.14
|
2026.1.14
|
References
Frequently Asked Questions
What is CVE-2026-27735?
Which mcp-server-git versions are affected?
What version fixes CVE-2026-27735?
Is mcp-server-git affected?
What CWE is associated with CVE-2026-27735?
How can I check PyPI dependencies for CVE-2026-27735?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vjqx-cfc4-9h6v",
"modified" : "2026-02-26T15:16:57Z",
"published" : "2026-02-26T15:16:57Z",
"aliases" : [ "CVE-2026-27735" ],
"summary" : "mcp-server-git : Path traversal in git_add allows staging files outside repository boundaries",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "mcp-server-git"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2026.1.14"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/modelcontextprotocol/servers/security/advisories/GHSA-vjqx-cfc4-9h6v"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-27735"
}, {
"type" : "WEB",
"url" : "https://github.com/modelcontextprotocol/servers/pull/3164"
}, {
"type" : "WEB",
"url" : "https://github.com/modelcontextprotocol/servers/commit/862e717ff714987bd5577318df09858e14883863"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/modelcontextprotocol/servers"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-26T15:16:57Z",
"nvd_published_at" : "2026-02-26T00:16:25Z"
}
}