Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-68143: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in modelcontextprotocol servers

0
Medium
VulnerabilityCVE-2025-68143cvecve-2025-68143cwe-22
Published: Wed Dec 17 2025 (12/17/2025, 22:09:43 UTC)
Source: CVE Database V5
Vendor/Project: modelcontextprotocol
Product: servers

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.

AI-Powered Analysis

AILast updated: 12/17/2025, 23:26:02 UTC

Technical Analysis

The vulnerability identified as CVE-2025-68143 affects the modelcontextprotocol (MCP) servers, specifically versions prior to 2025.9.25. The MCP servers include a tool called git_init, which is designed to initialize Git repositories. Unlike other tools that require an existing repository, git_init accepted arbitrary filesystem paths without validating whether the target directory was appropriate or restricted. This improper limitation of pathname (CWE-22) allowed attackers to specify any directory accessible by the server process for repository creation. Consequently, an attacker could create or manipulate Git repositories in unintended locations, potentially overwriting or injecting malicious content into critical directories. The vulnerability is remotely exploitable over the network without authentication and requires user interaction, such as triggering the git_init operation. The CVSS 4.0 score is 6.5 (medium severity), reflecting the network attack vector, low attack complexity, no privileges required, but requiring user interaction. The flaw was addressed by removing the git_init tool entirely in version 2025.9.25, aligning the server’s operation strictly to existing repositories and eliminating the unsafe path acceptance. No known exploits are currently reported in the wild, but the vulnerability poses a risk of unauthorized filesystem manipulation and potential supply chain or code integrity attacks if exploited.

Potential Impact

For European organizations, this vulnerability could lead to unauthorized creation or modification of Git repositories on MCP servers, potentially compromising code integrity and supply chain security. Organizations relying on MCP servers for software development or deployment could face risks of malicious code injection or disruption of development workflows. The ability to write to arbitrary directories accessible by the server process could also be leveraged to overwrite critical files or plant backdoors, impacting confidentiality, integrity, and availability of systems. Given the network-exploitable nature and lack of authentication, attackers could remotely target vulnerable servers, increasing the risk to organizations with exposed MCP services. The impact is particularly significant for organizations in sectors with stringent software integrity requirements, such as finance, telecommunications, and critical infrastructure within Europe.

Mitigation Recommendations

European organizations should immediately upgrade all MCP server deployments to version 2025.9.25 or later, where the vulnerable git_init tool has been removed. Until upgrades are applied, restrict network access to MCP servers to trusted internal networks and implement strict firewall rules to limit exposure. Conduct audits of existing repositories and filesystem permissions to detect unauthorized repository creation or suspicious directory modifications. Employ application-level monitoring and logging to detect anomalous git_init usage or unexpected filesystem changes. Additionally, enforce the principle of least privilege on the server process to minimize accessible directories and reduce potential attack surface. Integrate secure software development lifecycle (SSDLC) practices to monitor and validate repository integrity continuously. Finally, educate developers and administrators about the risks associated with arbitrary path acceptance and ensure that any custom tools or scripts validate input paths rigorously.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2025-12-15T18:15:08.404Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 69432efa058703ef3fc97f38

Added to database: 12/17/2025, 10:30:18 PM

Last enriched: 12/17/2025, 11:26:02 PM

Last updated: 12/18/2025, 1:15:58 PM

Views: 7

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats