CVE-2025-68144

N/A Unknown

📋 TL;DR

This vulnerability in mcp-server-git allows attackers to pass malicious arguments that get interpreted as command-line flags to git commands, enabling arbitrary file overwrites. Users of mcp-server-git versions before 2025.12.17 who expose git_diff or git_checkout functionality to untrusted input are affected.

💻 Affected Systems

Products:
  • mcp-server-git
Versions: All versions prior to 2025.12.17
Operating Systems: All operating systems running mcp-server-git
Default Config Vulnerable: ⚠️ Yes
Notes: Only vulnerable if git_diff or git_checkout functions are exposed to user input. The vulnerability exists in the argument handling of these specific functions.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise via arbitrary file overwrite leading to privilege escalation, data destruction, or remote code execution by overwriting critical system files.

🟠

Likely Case

Data corruption or loss through overwriting application files, configuration files, or user data in the context of the running process.

🟢

If Mitigated

Limited impact if proper input validation and least privilege principles are followed, restricting the process to non-critical directories.

🌐 Internet-Facing: HIGH if git_diff/git_checkout endpoints are exposed to untrusted users without input validation.
🏢 Internal Only: MEDIUM as internal users could still exploit this for privilege escalation or data destruction within their access scope.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires the ability to pass arguments to vulnerable functions. No authentication bypass is needed if these functions are exposed without authentication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2025.12.17

Vendor Advisory: https://github.com/modelcontextprotocol/servers/security/advisories/GHSA-9xwc-hfwc-8w59

Restart Required: Yes

Instructions:

1. Update mcp-server-git to version 2025.12.17 or later. 2. Restart the mcp-server-git service. 3. Verify the fix by testing with malicious inputs.

🔧 Temporary Workarounds

Input Validation Wrapper

all

Add custom validation to reject arguments starting with hyphens before passing to git_diff/git_checkout functions

# Implement input validation in your application code to reject arguments starting with '-'

Function Restriction

all

Disable or restrict access to git_diff and git_checkout functions if not required

# Modify configuration to disable vulnerable endpoints or restrict access to trusted users only

🧯 If You Can't Patch

  • Implement strict input validation at the application layer to reject any arguments starting with hyphens
  • Run mcp-server-git with minimal privileges and restrict filesystem access using chroot, containers, or filesystem permissions

🔍 How to Verify

Check if Vulnerable:

Check if your mcp-server-git version is earlier than 2025.12.17 and if git_diff/git_checkout functions accept user input

Check Version:

Check package version or consult application documentation for version information

Verify Fix Applied:

Test with arguments starting with hyphens (e.g., '--output=/etc/passwd') - these should be rejected in patched versions

📡 Detection & Monitoring

Log Indicators:

  • Unusual git commands with flag-like arguments in application logs
  • Failed file operations or permission errors from unexpected paths

Network Indicators:

  • Unusual patterns of requests to git_diff/git_checkout endpoints with suspicious parameters

SIEM Query:

Search for application logs containing 'git_diff' or 'git_checkout' with arguments starting with hyphens

🔗 References

📤 Share & Export