CVE-2026-27735 — mcp-server-git : Path traversal in mcp-server-git
mcp-server-git : Path traversal in git_add allows staging files outside repository boundaries
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.56%). Schedule for your next planned update.
Does your project use an affected mcp-server-git version?
Paste your requirements.txt to check it for CVE-2026-27735 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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.
Advisory Timeline
- First published February 26, 2026 (273 days ago).
- Last revised July 13, 2026 — 137 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
pip install "mcp-server-git>=2026.1.14"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: PyPI (1).
| Package | Fixed In |
|---|---|
| mcp-server-git PyPI · Affected: 0.2.0, 0.3.0, 0.4.0, 0.4.1 (+10 more) | 2026.1.14 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-22Path TraversalMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.3 score means for each attack dimension.
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
References
- https://github.com/modelcontextprotocol/servers/security/advisories/GHSA-vjqx-cfc4-9h6vWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-27735ADVISORY
- https://github.com/modelcontextprotocol/servers/pull/3164WEB
- https://github.com/modelcontextprotocol/servers/commit/862e717ff714987bd5577318df09858e14883863WEB
- https://github.com/modelcontextprotocol/serversPACKAGE
Frequently Asked Questions
- What is CVE-2026-27735?
- mcp-server-git : Path traversal in git_add allows staging files outside repository boundaries. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 9.3/10).
- How do I check if my project is affected by CVE-2026-27735?
- CVE-2026-27735 affects mcp-server-git. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-27735 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is a below-median EPSS score — only 40% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2025-68143CRITICAL
mcp-server-git's unrestricted git_init tool allows repository creation at arbitrary filesystem locations
- CVE-2025-68145CRITICAL
mcp-server-git has missing path validation when using --repository flag
- CVE-2025-68143MEDIUM
mcp-server-git's unrestricted git_init tool allows repository creation at arbitrary filesystem locations
- CVE-2026-129221MEDIUM
NLTK: ARFF_Formatter Injects Weka ARFF Schema Directives via Attacker-Controlled Class Labels
- CVE-2025-68145MEDIUM
mcp-server-git has missing path validation when using --repository flag
- CVE-2026-128140MEDIUM
NLTK: Downloader cyclic collection indices cause an infinite closure walk