CVE-2025-68143: Mcp server git Mcp-server-git's Unrestricted Git_init Tool Allows Vulnerability

MODERATE
Advisory Identifier: GHSA-5cgr-j3jf-jw3v
CWE-22
Published
Advisory Summary

CVE-2025-68143 is a MODERATE mcp-server-git's unrestricted git_init tool allows vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Mcp server git libraries in the PyPI ecosystem. The issue involves mcp-server-git's unrestricted git_init tool allows repository creation at arbitrary filesystem locations. Remediation is available by upgrading affected packages to version 2025.9.25.

CVE-2025-68143 at a Glance

CVE Identifier CVE-2025-68143
GHSA Identifier GHSA-5cgr-j3jf-jw3v
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Mcp server git
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2025-68143

To remediate this vulnerability, upgrade all affected Mcp server git dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

mcp-server-git fixed: 2025.9.25
pip install mcp-server-git>=2025.9.25
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show mcp-server-git

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-68143, inspect your installed packages using pip:

pip show mcp-server-git

Analyze the terminal output to locate any version of Mcp server git in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2025.9.25), your application is affected.

Note: The pip show mcp-server-git command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Mcp server git, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2025-68143 Affected Mcp server git Versions

1 component(s)
Fixed Versions:
2025.9.25
Product / Package Ecosystem Affected Versions Fixed Version
mcp-server-git
PyPI
< 2025.9.25
2025.9.25

References

Frequently Asked Questions

What is CVE-2025-68143?
CVE-2025-68143 is a security vulnerability in Mcp server git involving mcp-server-git's unrestricted git_init tool allows repository creation at arbitrary filesystem locations under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Mcp server git versions are affected?
Affected versions include releases prior to 2025.9.25 across affected packages: mcp-server-git.
What version fixes CVE-2025-68143?
Upgrading to 2025.9.25 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mcp-server-git affected?
Yes, mcp-server-git is affected in releases prior to 2025.9.25. Upgrade your dependency to 2025.9.25 or later.
What CWE is associated with CVE-2025-68143?
CVE-2025-68143 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check PyPI dependencies for CVE-2025-68143?
Run the dependency tree command: 'pip show mcp-server-git'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5cgr-j3jf-jw3v",
  "modified" : "2025-12-20T05:13:48Z",
  "published" : "2025-12-17T19:49:54Z",
  "aliases" : [ "CVE-2025-68143" ],
  "summary" : "mcp-server-git's unrestricted git_init tool allows repository creation at arbitrary filesystem locations",
  "details" : "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.\n\nThank you to https://hackerone.com/yardenporat for disclosure, @0dd for contributing the fix.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "mcp-server-git"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2025.9.25"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/modelcontextprotocol/servers/security/advisories/GHSA-5cgr-j3jf-jw3v"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-68143"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/modelcontextprotocol/servers/commit/eac56e7bcde48fb64d5a973924d05d69a7d876e6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/modelcontextprotocol/servers"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-17T19:49:54Z",
    "nvd_published_at" : "2025-12-17T23:16:04Z"
  }
}