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

- Severity: Medium 6.4 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 7.53%, higher than 94% of CVEs (2026-12-01)
- Published: 2025-12-17T22:12:45.410Z
- Modified: 2026-09-30T23:10:00.237Z
- Also known as: GHSA-j22h-9j4x-23w5, PYSEC-2026-1623
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- modelcontextprotocol servers: < 2025.12.17
- mcp-server-git (PyPI): before 2025.12.18
- lfprojects model_context_protocol_servers: before 2025.12.18

## Every score

- GitHub_M: CVSS:4.0 6.4 Medium `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`
- GitHub: CVSS:4.0 Medium `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`
- NVD: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`
- PyPA Advisory Database: CVSS:4.0 `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`

## References

- <https://github.com/modelcontextprotocol/servers/security/advisories/GHSA-j22h-9j4x-23w5> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-68145> (advisory)
- <https://github.com/modelcontextprotocol/servers> (package)
- <https://pypi.org/project/mcp-server-git> (package)
- <https://github.com/advisories/GHSA-j22h-9j4x-23w5> (advisory)

## Sources

- CVE List: [CVE-2025-68145](https://www.cve.org/CVERecord?id=CVE-2025-68145), CVE Terms of Use, modified 2025-12-18
- GitHub Advisory Database: [GHSA-j22h-9j4x-23w5](https://github.com/advisories/GHSA-j22h-9j4x-23w5), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2025-68145](https://nvd.nist.gov/vuln/detail/CVE-2025-68145), Public domain, modified 2026-09-30
- PyPA Advisory Database: [PYSEC-2026-1623](https://osv.dev/vulnerability/PYSEC-2026-1623), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2025-68145 · Whole record: https://cve.day/CVE-2025-68145.json · Rebuilt by cve.day 2026-11-25T22:59:09.608Z
