Skip to content
Heist/ feed
Back to feed
Medium

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

Type: advisorySources: OSV

In mcp-server-git versions prior to 2025.12.17, 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.17 upon release to remediate this issue.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-68145
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 16:31 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 17 Dec 2025, 22:12 UTC

In mcp-server-git versions prior to 2025.12.17, 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.17 upon release to remediate this issue.

osv:CVE-2025-68145
Complete source record
{
  "id": "c17f51b5a1cd7a7bd3f7d570ea57990a881987910da271c7d6e9b9a174c95470",
  "url": "https://osv.dev/vulnerability/CVE-2025-68145",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "mcp-server-git has missing path validation when using --repository flag",
    "summary": "In mcp-server-git versions prior to 2025.12.17, 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.17 upon release to remediate this issue.",
    "evidence": "osv:CVE-2025-68145",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2025-68145",
      "aliases": [
        "CVE-2025-68145",
        "GHSA-j22h-9j4x-23w5",
        "PYSEC-2026-1623"
      ],
      "metrics": [
        {
          "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:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/modelcontextprotocol/servers",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "24b9402fd6904e74dff78d06be313fc8b701b937"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:lfprojects:model_context_protocol_servers:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2025.12.18"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "typescript-servers-0.6.2",
            "python-servers-0.6.2",
            "typescript-servers-0.6.1",
            "typescript-servers-0.6.0",
            "python-servers-0.6.1",
            "0.5.1",
            "0.5.0",
            "0.4.1",
            "0.4.0",
            "0.3.1",
            "0.3.0",
            "0.2.0",
            "0.1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68145.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:21.094116317Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68145.json",
        "https://github.com/modelcontextprotocol/servers/security/advisories/GHSA-j22h-9j4x-23w5",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-68145"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-22"
        ],
        "cna_assigner": "GitHub_M",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "2025.12.17"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              }
            ]
          },
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "2025.12.17"
                  }
                ],
                "source": "DESCRIPTION"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68145.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-68145",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 487171,
  "published_at": "2025-12-17T22:12:45.41+00:00"
}