CVE-2025-68144

mcp-server-git argument injection in git_diff and git_checkout functions allows overwriting local files

Published Dec 17, 2025 CVSS 4.0 · 6.3 Medium EPSS 7.2% KEV · Not listed
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.

Analysis

No analysis available yet

Remediation

No remediation available yet

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-9xwc-hfwc-8w59 mcp-server-git argument injection in git_diff and git_checkout functions allows overwriting local files
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

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

{'score': 7.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L'}

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

{'score': 6.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:N/SI:H/SA:L'}

Weaknesses
  • CWE-88

    Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Dec 18, 2025, 3:07 PM
Reserved
Dec 15, 2025, 7:06 PM
Status
Analyzed
Published
Dec 17, 2025, 11:16 PM
Modified
Jun 17, 2026, 9:58 AM