---
id: CVE-2025-68145
aliases:
  - GHSA-j22h-9j4x-23w5
  - PYSEC-2026-1623
title: mcp-server-git has missing path validation when using --repository flag
summary: mcp-server-git has missing path validation when using --repository flag
severity: medium
vendor: mcp-server-git
product: mcp-server-git
ecosystem: pip
affected:
  - mcp-server-git < 2025.12.18
patched:
  - mcp-server-git 2025.12.18
published: '2025-12-17'
updated: '2026-07-07'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-j22h-9j4x-23w5'
references:
  - url: >-
      https://github.com/modelcontextprotocol/servers/security/advisories/GHSA-j22h-9j4x-23w5
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2025-68145'
  - url: 'https://github.com/modelcontextprotocol/servers'
tags:
  - osv
  - pip
epss: 0.07032
epssPercentile: 0.939
ingestedAt: '2026-07-08T18:25:50.523Z'
---

## Overview

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

## Affected packages

- `mcp-server-git < 2025.12.18`

## Remediation

Upgrade to a patched release:

- `mcp-server-git 2025.12.18`
