CVE-2025-68145
Path Traversal in mcp-server-git Allows Unauthorized Repository Access
Publication date: 2025-12-17
Last updated on: 2026-04-14
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| lfprojects | model_context_protocol_servers | to 2025.12.18 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-22 | 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. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability occurs 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. The server did not properly validate that repo_path arguments in subsequent tool calls were within the configured repository path. As a result, tool calls could operate on other repositories accessible to the server process, potentially allowing unauthorized access or operations on those repositories. The issue is fixed by adding path validation that resolves both the configured repository and the requested path (including following symlinks) to ensure the requested path is within the allowed repository before executing any git operations.
How can this vulnerability impact me? :
This vulnerability can allow unauthorized operations on repositories other than the intended restricted repository. An attacker or user could exploit this to access or modify other repositories accessible to the server process, potentially leading to unauthorized data access, data modification, or disruption of repository integrity.
What immediate steps should I take to mitigate this vulnerability?
Users are advised to upgrade mcp-server-git to version 2025.12.17 or later to remediate this issue.