CVE-2025-68143
JSON

6.5medium

mcp-server-git's unrestricted git_init tool allows repository creation at arbitrary filesystem locations

Severity
6.5medium CVSS:4.0 by GitHub_M
Exploit likelihood
8.70% (higher than 95% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-5cgr-j3jf-jw3vPYSEC-2026-1621

Description

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 git_init tool accepted arbitrary filesystem paths and created Git repositories without validating the target location. Unlike other tools which required an existing repository, git_init 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.

Affected

Product or packageVersionsReported by
modelcontextprotocol servers< 2025.9.25CVE List
mcp-server-git (PyPI)before 2025.9.25GitHub Advisory Database, PyPA Advisory Database
lfprojects model_context_protocol_serversbefore 2025.9.25NVD

All scores

GitHub_M6.5medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H

Classification

CWE-22

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

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 git_init tool accepted arbitrary filesystem paths and created Git repositories without validating the target location. Unlike other tools which required an existing repository, git_init 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.

GitHub Advisory Database

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. Unlike other tools which required an existing repository, git_init 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.

NVD (es)

Servidores de Protocolo de Contexto de Modelo es una colección de implementaciones de referencia para el protocolo de contexto de modelo (MCP). En versiones de mcp-server-git anteriores a 2025.9.25, la herramienta git_init aceptaba rutas de sistema de archivos arbitrarias y creaba repositorios Git sin validar la ubicación de destino. A diferencia de otras herramientas que requerían un repositorio existente, git_init podía operar en cualquier directorio accesible para el proceso del servidor, haciendo que esos directorios fueran elegibles para operaciones git posteriores. La herramienta fue eliminada por completo, ya que el servidor está destinado a operar solo en repositorios existentes. Se aconseja a los usuarios actualizar a 2025.9.25 o posterior para remediar este problema.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-68143 changed 2025-12-18CVE Terms of Use
GitHub Advisory DatabaseGHSA-5cgr-j3jf-jw3v changed 2026-07-07CC-BY-4.0
NVDCVE-2025-68143 changed 2026-09-30Public domain
PyPA Advisory DatabasePYSEC-2026-1621 changed 2026-07-07CC-BY-4.0