CVE-2026-85626: git-mcp-server 2.15.1 Argument Injection via Git Ref Parameters
git-mcp-server 2.15.1 contains an argument injection vulnerability in the ref and object parameters of gitlog, gitdiff, and gitshow tools that lack leading-dash validation. Attackers can inject git command-line options like --output= to write files outside the repository to arbitrary paths accessible by the process.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Instances of git-mcp-server 2.15.1 that make the git_log, git_diff, or git_show tools available to an attacker are exposed. The attacker can target the ref or object parameters accepted by those tools.
Does exploitation require authentication or user interaction?
No authentication or user interaction is required according to the supplied vector. The attack is network-reachable and has low attack complexity.
What can an attacker do through the injection?
An attacker can inject Git command-line options through affected parameters, including --output=. This can cause files to be written outside the repository to arbitrary paths that the git-mcp-server process can access.
How can I determine whether an instance is affected?
Verify whether the deployment is running git-mcp-server 2.15.1 and exposes git_log, git_diff, or git_show. Check whether their ref or object inputs permit values beginning with a dash, since those inputs lack leading-dash validation in the affected version.