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

mcp-server-git Updated 26 Feb 2026

Summary

26/02/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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

mcp-server-git is a tool designed for managing Git repositories, enabling users to perform various Git operations programmatically. It leverages GitPython to interact with Git repositories, allowing for seamless integration into Python applications. However, prior to version 2026.1.14, the tool lacked proper validation of file paths, making it susceptible to path traversal attacks.

Vulnerability Detail

The vulnerability in mcp-server-git arises from the git_add tool's failure to validate file paths provided in the files argument. This oversight allows relative paths containing '..' sequences to be accepted, potentially staging files outside the intended repository boundaries. Consequently, sensitive files could be inadvertently committed and pushed to remote repositories, leading to data exfiltration. The root cause lies in the use of GitPython's repo.index.add(), which does not enforce working-tree boundary checks for relative 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 can manually validate file paths before passing them to the git_add tool to ensure they remain within the repository boundaries. This can be done by checking if the resolved path is a subdirectory of the repository's root.

Conclusion

The path traversal vulnerability in mcp-server-git allows for the staging of files outside repository boundaries, posing a risk of sensitive data exposure. Users are strongly advised to upgrade to version 2026.1.14 or newer to mitigate this risk. Additionally, utilizing tools like Vulert can help monitor for such vulnerabilities in open-source dependencies.

See every vulnerability recorded for mcp-server-git →

Share this vulnerability

FAQ

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

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

If exploited, this vulnerability could lead to the unintentional staging and committing of sensitive files, resulting in data leaks.

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

If an immediate upgrade is not possible, ensure to validate file paths manually to prevent staging files outside the repository boundaries.

Related vulnerabilities

Recent vulnerabilities recorded for mcp-server-git.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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