CVE-2025-68145 — Vulnerability in mcp-server-git — CVE Details
mcp-server-git has missing path validation when using --repository flag
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.77%). Schedule for your next planned update.
Does your project use an affected mcp-server-git version?
Paste your requirements.txt to check it for CVE-2025-68145 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
In mcp-server-git versions prior to 2025.12.18, 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.18 to remediate this issue.
Thank you to https://hackerone.com/yardenporat for reporting.
Advisory Timeline
- First published December 17, 2025 (344 days ago).
- Last revised July 7, 2026 — 202 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
pip install "mcp-server-git>=2025.12.18"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: PyPI (1).
| Package | Fixed In |
|---|---|
| mcp-server-git PyPI · Affected: 0.2.0, 0.3.0, 0.4.0, 0.4.1 (+9 more) | 2025.12.18 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-22Path TraversalMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.3 score means for each attack dimension.
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
Frequently Asked Questions
- What is CVE-2025-68145?
- mcp-server-git has missing path validation when using --repository flag. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 9.3/10).
- How do I check if my project is affected by CVE-2025-68145?
- CVE-2025-68145 affects mcp-server-git. It has a 0.8% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-68145 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is an above-median EPSS score — 52% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2025-68143CRITICAL
mcp-server-git's unrestricted git_init tool allows repository creation at arbitrary filesystem locations
- CVE-2026-27735CRITICAL
mcp-server-git : Path traversal in git_add allows staging files outside repository boundaries
- CVE-2025-68143MEDIUM
mcp-server-git's unrestricted git_init tool allows repository creation at arbitrary filesystem locations
- CVE-2026-129221MEDIUM
NLTK: ARFF_Formatter Injects Weka ARFF Schema Directives via Attacker-Controlled Class Labels
- CVE-2026-128140MEDIUM
NLTK: Downloader cyclic collection indices cause an infinite closure walk
- CVE-2026-27735MEDIUM
mcp-server-git : Path traversal in git_add allows staging files outside repository boundaries