CVE-2025-68145: mcp-server-git Path Validation Flaw Allows Unauthorized Repository Access
Summary
CVE-2025-68145: mcp-server-git has missing path validation when using --repository flag. Affects mcp-server-git versions < 2025.11.25. No fix is published. 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 Python package that facilitates the management of Git repositories through a server interface. It allows users to perform various Git operations while providing a level of access control through the --repository flag, which is intended to restrict operations to a specified repository path. However, a flaw in path validation can lead to unauthorized access to other repositories.
Vulnerability Detail
The vulnerability in mcp-server-git arises from inadequate path validation when the server is initiated with the --repository flag. Specifically, the application fails to verify that subsequent repo_path arguments in tool calls are confined within the designated repository path. This oversight can permit unauthorized operations on repositories that should be inaccessible to the server process. The issue is exacerbated by the potential for symlink traversal, which could lead to further exploitation. As a result, malicious users could manipulate the server to perform unintended Git operations on sensitive repositories.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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 runs with limited permissions to minimize the risk of unauthorized access to other repositories.
Conclusion
The mcp-server-git vulnerability (CVE-2025-68145) highlights the importance of proper path validation in software applications. Users are strongly advised to upgrade to the latest version to mitigate the risks associated with unauthorized repository access. By following the recommended steps, users can ensure their systems remain secure.
See every vulnerability recorded for mcp-server-git →
FAQ
CVE-2025-68145 is a vulnerability in the mcp-server-git package that allows unauthorized access to repositories due to missing path validation.
You can use the Vulert 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 users to perform Git operations on repositories that should be restricted, potentially leading to data breaches or loss.
You can upgrade mcp-server-git by running the command pip install --upgrade mcp-server-git in your terminal.
The CVSS score of this vulnerability is 6.4, indicating a moderate level of risk.
References
Related vulnerabilities
Recent vulnerabilities recorded for mcp-server-git.