CVE-2025-68145: mcp-server-git Path Validation Vulnerability
Summary
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 ↓
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.
No signup required · Results in about 60 seconds
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 →
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.