mcp-server-git's unrestricted git_init tool allows repository creation at arbitrary filesystem locations
CVE-2025-68143 · GHSA-5cgr-j3jf-jw3v · published 2025-12-17 · updated 2025-12-20
- Severity
- Medium
- CVSS score
- 6.5
- Chance of exploitation (EPSS)
- 8.7%
- Fixed in
- 2025.9.25
- Exploitation No known exploitation
- Automatable Yes
- Technical impact Partial
- CISA SSVC
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.
Upgrade mcp-server-git to 2025.9.25 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| mcp-server-git | PyPI | < 2025.9.25 | 2025.9.25 |
- CriticalMCP Path Traversal Allows Full-Filesystem Read and JWT Secret Exfiltration Leading to Account Takeoverlangflow, langflow-base
- Critical@zereight/mcp-gitlab: Unauthenticated arbitrary file read via `upload_markdown` enables PAT exfiltration and full account takeover@zereight/mcp-gitlab
- CriticalFlowise RCE via SQL Database Chain Nodeflowise, flowise-components
- CriticalLangroid: SQLChatAgent dangerous-function blocklist can be bypassed with quoted or schema-qualified pg_read_file callslangroid
- Criticalfast-mcp-telegram: Bearer token path traversal bypasses reserved Telegram session protectionfast-mcp-telegram
- CriticalMCP Toolbox HTTP tool path parameters allow traversal to unintended endpointsgithub.com/googleapis/mcp-toolbox
- Mediummcp-server-git : Path traversal in git_add allows staging files outside repository boundariesmcp-server-git
- Mediummcp-server-git argument injection in git_diff and git_checkout functions allows overwriting local filesmcp-server-git
- Mediummcp-server-git has missing path validation when using --repository flagmcp-server-git
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.