Argument Injection Vulnerability in git-mcp-server
git-mcp-server version 2.15.1 is vulnerable to argument injection due to insufficient input validation in the ref and object parameters of its git tools, allowing for arbitrary file writes.
CVE search metadata
CVE search record: CVE-2026-85626. Severity: high. CVSS: 7.5. KEV: no. Product: git-mcp-server (2.15.1). Brief: Argument Injection Vulnerability in git-mcp-server. Brief link: https://feed.craftedsignal.io/briefs/2026-09-git-mcp-server-argument-injection/
git-mcp-server version 2.15.1 contains an argument injection vulnerability within the ref and object parameters used by the git_log, git_diff, and git_show tools. The vulnerability arises because these parameters lack proper validation to prevent the inclusion of leading dashes, which are interpreted as command-line flags by the underlying git binary. An attacker who can influence these parameters can inject arbitrary git command-line arguments, such as the --output option. By controlling the output path, an attacker can coerce the process into writing files to unauthorized locations on the filesystem, provided those paths are accessible by the service account running the git-mcp-server process. This vulnerability (CVE-2026-85626) poses a significant risk for unauthorized file creation or overwriting, potentially leading to remote code execution or privilege escalation if sensitive configuration files or startup scripts are targeted.
Impact
Successful exploitation of this vulnerability allows an unauthenticated or authenticated user with access to the MCP interface to perform arbitrary file writes. This can result in system compromise, data destruction, or the injection of malicious scripts that gain execution context under the user account running the git-mcp-server instance.
Recommendation
- Upgrade to a version of git-mcp-server that addresses CVE-2026-85626, as no specific version is identified as patched in the current report, monitor vendor security advisories for the remediation release.
- Implement strict input validation on the backend for all ref and object parameters to ensure they do not start with a dash character.
- Run the git-mcp-server process with the least privilege necessary, restricting write access to the filesystem to only required directories.
- Monitor process execution logs for instances where git child processes are spawned with unexpected command-line arguments, specifically the --output parameter.
Immediate actions
Review environment for git-mcp-server version 2.15.1
Threat Hunt
Search for git processes with --output flag in command history
Data: Process creation events with command line
Enrichment needed
- Patched version availability (CTI) Monitor vendor for update release to enable remediation
Mitigations
Restrict service account permissions to prevent writing to system directories
CVE-2026-85626
Detection coverage 1
Detect Suspicious Git Command Line Arguments
highDetects potential exploitation of CVE-2026-85626 by identifying git processes spawned with high-risk output arguments
Detection queries are available on the platform. Get full rules →