CVE-2025-68144: mcp-server-git Argument Injection Vulnerability Leading to Local File Overwrites

mcp-server-git Updated 07 Jul 2026

Summary

07/07/2026
Yes i
Medium
6.3

CVE-2025-68144: In mcp-server-git versions prior to 2025.12.18, the git_diff and git_checkout functions passed user-controlled arguments directly to git CLI commands without sanitization. Affects mcp-server-git versions < 2025.12.18. Fixed in 2025.12.18. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

mcp-server-git is a Python package that facilitates interactions with Git repositories through a server interface. It provides functionalities such as diffing and checking out branches. However, prior to version 2025.12.18, it was vulnerable to argument injection, allowing malicious users to manipulate commands executed by the package.

Vulnerability Detail

The vulnerability arises from the git_diff and git_checkout functions, which directly pass user-controlled arguments to git CLI commands without proper sanitization. This oversight allows attackers to inject flag-like values (e.g., --output=/path/to/file), which are interpreted as command-line options instead of git references. Consequently, this can lead to arbitrary file overwrites on the local filesystem, posing a significant security risk.

How To Fix

Minimum fixed version

2025.12.18

This is the first release that contains the fix.

pip install --upgrade "mcp-server-git==2025.12.18"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can avoid passing any user-controlled arguments directly to the git_diff and git_checkout functions until the package is updated. Additionally, ensure that any file paths provided do not start with a hyphen (-) to prevent command-line option interpretation.

Conclusion

The mcp-server-git package has a significant vulnerability that allows for argument injection, leading to potential local file overwrites. Users are strongly advised to update to version 2025.12.18 or later to mitigate this risk. For those unable to update immediately, temporary workarounds are available to reduce exposure.

See every vulnerability recorded for mcp-server-git →

Share this vulnerability

FAQ

The vulnerability allows for argument injection in git commands, potentially leading to arbitrary file overwrites.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The CVSS score of this vulnerability is 6.3, indicating a moderate level of severity.

If an immediate update is not possible, avoid using the vulnerable functions with user-controlled inputs and ensure that no arguments start with a hyphen.

The vulnerability was reported by a user on HackerOne, specifically by the user with the handle yardenporat.

Related vulnerabilities

Recent vulnerabilities recorded for mcp-server-git.

How To Fix

Minimum fixed version

2025.12.18

This is the first release that contains the fix.

pip install --upgrade "mcp-server-git==2025.12.18"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback