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

Medium 6.5 Published Updated

Attackers can create Git repositories at arbitrary filesystem locations via the git_init tool, potentially enabling unauthorized access to directories.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2025-68143?

CVE-2025-68143 is a medium-severity path traversal vulnerability in modelcontextprotocol servers, published on 17 Dec 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-22

Which versions are affected by CVE-2025-68143?

3 open source packages ship an affected version, including mcp-server-git. It affects 1 product.

PackageAffectedFixed in
mcp-server-git PyPIAll versions2025.9.25
mcp-server-git PyPIAll versions2025.9.25
mcp-server-git PyPIAll versions2025.9.25

Products include Lfprojects Model Context Protocol Servers.

How do I fix CVE-2025-68143?

Upgrade mcp-server-git to 2025.9.25 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2025-68143 being exploited?

There is no known exploitation of CVE-2025-68143 in the wild and no public exploit code.

Sources

Also known as GHSA-5cgr-j3jf-jw3v, MINI-hc88-pj3p-hg9h, PYSEC-2026-1621.

Is CVE-2025-68143 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free