CVE-2025-68143
Arbitrary Directory Creation Vulnerability in MCP git_init Tool
Publication date: 2025-12-17
Last updated on: 2026-04-14
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| lfprojects | model_context_protocol_servers | to 2025.9.25 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-22 | The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
The vulnerability exists in the git_init tool of mcp-server-git versions prior to 2025.9.25. This tool accepted arbitrary filesystem paths and created Git repositories without validating the target location. Unlike other tools that required an existing repository, git_init could operate on any directory accessible to the server process, potentially allowing unauthorized git operations on those directories. The tool was removed in version 2025.9.25 to fix this issue.
How can this vulnerability impact me? :
This vulnerability can allow unauthorized creation and manipulation of Git repositories in arbitrary directories accessible to the server process. This could lead to unauthorized access or modification of files, potentially compromising data integrity or confidentiality within those directories.
What immediate steps should I take to mitigate this vulnerability?
Upgrade the mcp-server-git software to version 2025.9.25 or newer, as this version removes the vulnerable git_init tool. The server should only operate on existing repositories, and the git_init tool that allowed arbitrary filesystem path usage has been removed to prevent this vulnerability.