Critical severity · published Dec 17, 2025
CVE-2025-68145
mcp-server-git has missing path validation when using --repository flag
9.1
CVSS
7%
EPSS
No
On KEV
Description
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
High
Integrity
High
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)7.0% · higher than 94% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
SE
servers · modelcontextprotocol
< 2025.12.17 · source: vendor
MC
Model Context Protocol Servers · Lfprojects
before 2025.12.18 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2025-68145
CVE.org
https://www.cve.org/CVERecord?id=CVE-2025-68145
Vendor Advisory
https://github.com/modelcontextprotocol/servers/security/advisories/GHSA-j22h-9j4x-23w5
More from servers
8.8
CVE-2025-68143
mcp-server-git's unrestricted git_init tool allows repository creation at arbitrary filesystem locations
7.1
CVE-2025-68144
mcp-server-git argument injection in git_diff and git_checkout functions allows overwriting local files
6.5
CVE-2026-27735
mcp-server-git : Path traversal in git_add allows staging files outside repository boundaries
