CVE-2025-68143: mcp-server-git Unrestricted git_init Tool Vulnerability
Summary
CVE-2025-68143: In mcp-server-git versions prior to 2025.9.25, the git_init tool accepted arbitrary filesystem paths and created Git repositories without validating the target location. Affects mcp-server-git versions < 2025.9.25. Fixed in 2025.9.25. 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 provides tools for managing Git repositories within a server environment. It allows users to perform various Git operations, including repository creation and management. However, prior to version 2025.9.25, the package contained a significant vulnerability in its git_init tool, which did not validate filesystem paths, leading to potential security risks.
Vulnerability Detail
The vulnerability in mcp-server-git arises from the git_init tool's ability to accept arbitrary filesystem paths for creating Git repositories. This lack of validation means that any directory accessible to the server process could be targeted, allowing unauthorized repository creation and subsequent operations in unintended locations. This could lead to data exposure or manipulation, as sensitive directories could be compromised. The vulnerability has been classified under CWE-22, indicating improper restriction of operations within the bounds of a memory buffer.
How To Fix
Minimum fixed version
2025.9.25
This is the first release that contains the fix.
pip install --upgrade "mcp-server-git==2025.9.25"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a workaround, users are advised to avoid using the git_init tool until they can upgrade to the patched version. Additionally, ensure that the server process has restricted access to sensitive directories to mitigate potential exploitation.
Conclusion
In summary, the mcp-server-git package has a vulnerability that allows unauthorized repository creation due to improper validation of filesystem paths in the git_init tool. Users are strongly encouraged to upgrade to version 2025.9.25 or newer to mitigate this risk.
See every vulnerability recorded for mcp-server-git →
FAQ
CVE-2025-68143 is a vulnerability in the mcp-server-git package that allows the git_init tool to create repositories at arbitrary filesystem locations without validation.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.
The risks include unauthorized repository creation and potential exposure or manipulation of sensitive data in directories accessible to the server process.
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.5, indicating a moderate severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for mcp-server-git.