CVE-2026-27735: mcp-server-git Path Traversal Vulnerability Allows Staging Files Outside Repository Boundaries

mcp-server-git Updated 18 Jul 2026

Summary

13/07/2026
Yes i
Moderate
6.4

CVE-2026-27735: mcp-server-git : Path traversal in git_add allows staging files outside repository boundaries. Affects mcp-server-git versions < 2026.1.14. Fixed in 2026.1.14. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

mcp-server-git is a tool designed for managing Git repositories, allowing users to perform various Git operations programmatically. It leverages GitPython to interact with Git repositories, enabling functionalities such as adding files, committing changes, and pushing updates. However, prior to version 2026.1.14, mcp-server-git had a critical vulnerability that allowed users to stage files outside the intended repository boundaries, potentially leading to the exposure of sensitive files.

Vulnerability Detail

The vulnerability in mcp-server-git arises from the git_add tool, which failed to validate file paths provided in the files argument. This oversight allowed relative paths containing '..' sequences to be accepted, enabling files outside the repository to be staged into the Git index. This could lead to sensitive files being inadvertently committed and pushed to remote repositories, posing a significant security risk. The issue was traced back to the use of GitPython's repo.index.add(), which did not enforce necessary boundary checks for working-tree paths.

How To Fix

Minimum fixed version

2026.1.14

This is the first release that contains the fix.

pip install --upgrade "mcp-server-git==2026.1.14"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users should avoid using relative paths that include '..' when staging files. Instead, ensure that all file paths provided to the git_add tool are strictly within the repository boundaries.

Conclusion

The mcp-server-git package had a significant vulnerability that allowed for path traversal, potentially exposing sensitive files. Users are strongly advised to upgrade to version 2026.1.14 or newer to mitigate this risk. Additionally, employing Vulert can help in monitoring and managing vulnerabilities in your software dependencies effectively.

See every vulnerability recorded for mcp-server-git →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 6.4, indicating a medium severity level.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

If exploited, this vulnerability could allow unauthorized access to sensitive files outside the repository, leading to data leaks and security breaches.

Yes, Vulert can monitor and alert you in real-time for open-source vulnerabilities in your software using just the Pipfile.lock.

If an immediate upgrade is not possible, ensure that you do not use relative paths that could lead outside the repository when staging files.

Related vulnerabilities

Recent vulnerabilities recorded for mcp-server-git.

How To Fix

Minimum fixed version

2026.1.14

This is the first release that contains the fix.

pip install --upgrade "mcp-server-git==2026.1.14"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback