Skip to content

← Public intelligence

PyPI package

mcp-server-git

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

4 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 6.4PyPIAmendedPublished

    mcp-server-git : Path traversal in git_add allows staging files outside repository boundaries

    CVE-2026-27735 · GHSA-vjqx-cfc4-9h6v

    Affected
    • PyPI mcp-server-git < 2026.1.14
    Fixed in
    2026.1.14· Vendor fix available
    Issue
    In mcp-server-git versions prior to 2026.1.14, the gitadd tool did not validate that file paths provided in the files argument were within the repository boundaries. The tool used GitPython's repo.index.add(, which did not enforce working-tree boundary checks for relative paths. As a result, relative paths containing ../ sequences that resolved outside the repository were accepted and staged into the Git index, potentially allowing sensitive files to be exfiltrated via subsequent commit and push operations. The fix in PR #3164 switches to repo.git.add(), which delegates to the Git CLI and properly rejects out-of-tree paths. Users are advised to upgrade to 2026.1.14 or newer to remediate this issue. mcp-server-git thanks https://hackerone.com/0dd-g for reporting and contributing the fix.

    Recommended action: Upgrade to 2026.1.14 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. Medium, CVSS 6.4PyPIAmendedPublished

    mcp-server-git has missing path validation when using --repository flag

    CVE-2025-68145 · GHSA-j22h-9j4x-23w5

    Affected
    • PyPI mcp-server-git < 2025.12.18
    Fixed in
    2025.12.18· Vendor fix available
    Issue
    In mcp-server-git versions prior to 2025.12.18, when the server is started with the --repository flag to restrict operations to a specific repository path, it did not validate that repopath arguments in subsequent tool calls were actually within that configured path. This could allow tool calls to operate on other repositories accessible to the server process. The fix adds path validation that resolves both the configured repository and the requested path (following symlinks) and verifies the requested path is within the allowed repository before executing any git operations. Users are advised to upgrade to 2025.12.18 to remediate this issue. Thank you to https://hackerone.com/yardenporat for reporting.

    Recommended action: Upgrade to 2025.12.18 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. Medium, CVSS 6.3PyPIAmendedPublished

    mcp-server-git argument injection in git_diff and git_checkout functions allows overwriting local files

    CVE-2025-68144 · GHSA-9xwc-hfwc-8w59

    Affected
    • PyPI mcp-server-git < 2025.12.18
    Fixed in
    2025.12.18· Vendor fix available
    Issue
    In mcp-server-git versions prior to 2025.12.18, the gitdiff and gitcheckout functions passed user-controlled arguments directly to git CLI commands without sanitization. Flag-like values (e.g., --output=/path/to/file for gitdiff) would be interpreted as command-line options rather than git refs, enabling arbitrary file overwrites. The fix adds validation that rejects arguments starting with - and verifies the argument resolves to a valid git ref via revparse before execution. Users are advised to update to 2025.12.18 resolve this issue. Thank you to https://hackerone.com/yardenporat for reporting.

    Recommended action: Upgrade to 2025.12.18 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  4. Medium, CVSS 6.5PyPIAmendedPublished

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

    CVE-2025-68143 · GHSA-5cgr-j3jf-jw3v

    Affected
    • PyPI mcp-server-git < 2025.9.25
    Fixed in
    2025.9.25· Vendor fix available
    Issue
    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. Thank you to https://hackerone.com/yardenporat for disclosure, @0dd for contributing the fix.

    Recommended action: Upgrade to 2025.9.25 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →