CVE-2025-68145: mcp-server-git Path Validation Vulnerability

mcp-server-git Updated 07 Jul 2026

Summary

07/07/2026
Yes i
Moderate
6.4

CVE-2025-68145: mcp-server-git has missing path validation when using --repository flag. Affects mcp-server-git versions < 2025.12.18. Fixed in 2025.12.18. 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

mcp-server-git is a tool designed for managing Git repositories in a server environment. It allows users to perform various Git operations while restricting access to specific repository paths. However, prior to version 2025.12.18, it lacked proper validation for repository paths, making it susceptible to unauthorized access to other repositories.

Vulnerability Detail

The vulnerability arises from the absence of path validation when using the --repository flag in mcp-server-git versions before 2025.12.18. When the server is initiated with this flag, it is supposed to limit operations to a designated repository path. However, it fails to validate that subsequent repo_path arguments are confined within this specified path. This oversight could enable unauthorized tool calls to interact with other repositories accessible to the server process, potentially leading to data exposure or manipulation.

How To Fix

Minimum fixed version

2025.12.18

This is the first release that contains the fix.

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

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

Workaround

As a temporary workaround, users can avoid using the --repository flag until they can upgrade to the patched version. Additionally, ensure that the server process has limited access to only the required repositories to mitigate risks.

Conclusion

The mcp-server-git vulnerability (CVE-2025-68145) highlights the importance of proper path validation in server applications. Users are strongly advised to upgrade to version 2025.12.18 or later to ensure their repositories are secure from unauthorized access.

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 needing to sign up.

Failure to address this vulnerability could lead to unauthorized access to sensitive data or manipulation of repositories, posing significant security risks.

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

If immediate upgrading is not possible, consider implementing strict access controls and avoiding the use of the --repository flag until the upgrade can be performed.

Related vulnerabilities

Recent vulnerabilities recorded for mcp-server-git.

How To Fix

Minimum fixed version

2025.12.18

This is the first release that contains the fix.

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

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