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

Published Feb 25, 2026
·
Updated

In mcp-server-git versions prior to 2026.1.14, the gitadd 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.

Other sources

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

NVD

Affected Software

3 affected componentsFixes available
mcp-server-git<2026.1.14
pip/mcp-server-git<2026.1.14
2026.1.14
Lfprojects Model Context Protocol Servers<2026.1.14

Event History

Feb 25, 2026
CVE Published
via MITRE·11:45 PM
Data Sourced
via MITRE·11:45 PM
DescriptionWeakness
Feb 26, 2026
Data Sourced
via NVD·12:16 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·12:16 AM
RemedyAffected Software
Advisory Published
via GitHub·03:16 PM
Data Sourced
via GitHub·03:16 PM
DescriptionWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-27735?

CVE-2026-27735 is considered a high severity vulnerability due to its potential impact on file security within a Git repository.

2

How do I fix CVE-2026-27735?

To fix CVE-2026-27735, upgrade to mcp-server-git version 2026.1.14 or later.

3

What is the nature of CVE-2026-27735?

CVE-2026-27735 is a path traversal vulnerability that allows destabilizing the staging process of files outside repository boundaries.

4

Which versions of mcp-server-git are affected by CVE-2026-27735?

mcp-server-git versions prior to 2026.1.14 are affected by CVE-2026-27735.

5

What components are impacted by CVE-2026-27735?

The vulnerability primarily affects the git_add functionality within mcp-server-git.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203