CVE-2025-68143: mcp-server-git's unrestricted git_init tool allows repository creation at arbitrary filesystem locations
In mcp-server-git versions prior to 2025.9.25, the gitinit tool accepted arbitrary filesystem paths and created Git repositories without validating the target location. Unlike other tools which required an existing repository, gitinit could operate on any directory accessible to the server process, making those directories eligible for subsequent git operations. The tool was removed entirely, as the server is intended to operate on existing repositories only. Users are advised to upgrade to 2025.9.25 or newer to remediate this issue.
Thank you to https://hackerone.com/yardenporat for disclosure, @0dd for contributing the fix.
Other sources
Model Context Protocol Servers is a collection of reference implementations for the model context protocol (MCP). In mcp-server-git versions prior to 2025.9.25, the gitinit tool accepted arbitrary filesystem paths and created Git repositories without validating the target location. Unlike other tools which required an existing repository, gitinit could operate on any directory accessible to the server process, making those directories eligible for subsequent git operations. The tool was removed entirely, as the server is intended to operate on existing repositories only. Users are advised to upgrade to 2025.9.25 or newer to remediate this issue.
— MITRE
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2025-68143?
CVE-2025-68143 is categorized as a high-severity vulnerability due to its potential for unauthorized repository creation.
How do I fix CVE-2025-68143?
To fix CVE-2025-68143, upgrade mcp-server-git to version 2025.9.25 or later.
What type of vulnerabilities does CVE-2025-68143 represent?
CVE-2025-68143 represents a path traversal vulnerability allowing arbitrary filesystem access.
Which versions of mcp-server-git are affected by CVE-2025-68143?
mcp-server-git versions prior to 2025.9.25 are affected by CVE-2025-68143.
What action can be taken to mitigate the risks of CVE-2025-68143?
To mitigate the risks of CVE-2025-68143, restrict server process permissions and restrict access to filesystem paths.