mcp-server-git argument injection in git_diff and git_checkout functions allows overwriting local files
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| modelcontextprotocol | servers | affected |
|
No data.
| Vendor | Product | Versions |
|---|---|---|
| Modelcontextprotocol | Servers | — |
| Source | ID | Title |
|---|---|---|
Github GHSA |
GHSA-9xwc-hfwc-8w59 | mcp-server-git argument injection in git_diff and git_checkout functions allows overwriting local files |
No CVSS v3.0
No CVSS v2
This CVE is not in the KEV list.
Exploit prediction score: 7.2% (7.209% probability within 30 days)
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Lfprojects
Lfprojects model Context Protocol Servers |
|
| CPEs | cpe:2.3:a:lfprojects:model_context_protocol_servers:*:*:*:*:*:*:*:* | |
| Vendors & Products |
Lfprojects
Lfprojects model Context Protocol Servers |
|
| Metrics |
cvssV3_1
|
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Modelcontextprotocol
Modelcontextprotocol servers |
|
| Vendors & Products |
Modelcontextprotocol
Modelcontextprotocol servers |
| Type | Values Removed | Values Added |
|---|---|---|
| Description | In mcp-server-git versions prior to 2025.12.17, the git_diff and git_checkout functions passed user-controlled arguments directly to git CLI commands without sanitization. Flag-like values (e.g., `--output=/path/to/file` for `git_diff`) would be interpreted as command-line options rather than git refs, enabling arbitrary file overwrites. The fix adds validation that rejects arguments starting with - and verifies the argument resolves to a valid git ref via rev_parse before execution. Users are advised to update to 2025.12.17 resolve this issue when it is released. | |
| Title | mcp-server-git argument injection in git_diff and git_checkout functions allows overwriting local files | |
| Weaknesses | CWE-88 | |
| References |
| |
| Metrics |
cvssV4_0
|
Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')