CVE-2025-68144: mcp-server-git argument injection in git_diff and git_checkout functions allows overwriting local files

Published Dec 17, 2025
·
Updated

In mcp-server-git versions prior to 2025.12.17, the gitdiff and gitcheckout functions passed user-controlled arguments directly to git CLI commands without sanitization. Flag-like values (e.g., --output=/path/to/file for gitdiff) 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 revparse before execution. Users are advised to update to 2025.12.17 resolve this issue when it is released.

Other sources

In mcp-server-git versions prior to 2025.12.18, the gitdiff and gitcheckout functions passed user-controlled arguments directly to git CLI commands without sanitization. Flag-like values (e.g., --output=/path/to/file for gitdiff) 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 revparse before execution. Users are advised to update to 2025.12.18 resolve this issue.

Thank you to https://hackerone.com/yardenporat for reporting.

GitHub

Affected Software

3 affected componentsFixes available
npm/mcp-server-git<2025.12.17
pip/mcp-server-git<2025.12.18
2025.12.18
Lfprojects Model Context Protocol Servers<2025.12.17

Event History

Dec 17, 2025
CVE Published
via MITRE·10:10 PM
Data Sourced
via MITRE·10:10 PM
DescriptionWeakness
Advisory Published
via GitHub·10:50 PM
Data Sourced
via GitHub·10:50 PM
DescriptionWeaknessAffected Software
Data Sourced
via NVD·11:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·11:16 PM
Affected Software
Jan 20, 2026
News Published
via The Register·01:00 PM
News Published
via The Register·01:01 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-68144?

CVE-2025-68144 has a medium severity due to the potential for command injection vulnerabilities.

2

How do I fix CVE-2025-68144?

To fix CVE-2025-68144, update mcp-server-git to version 2025.12.17 or later.

3

What symptoms indicate a system is vulnerable to CVE-2025-68144?

Indicators of vulnerability to CVE-2025-68144 include unexpected command execution when user-controlled input is provided to git CLI commands.

4

Which software versions are affected by CVE-2025-68144?

CVE-2025-68144 affects mcp-server-git versions prior to 2025.12.17 and prior to 2025.11.25 from pip.

5

Is there a way to mitigate CVE-2025-68144 if I cannot upgrade?

If an upgrade is not feasible, consider sanitizing user inputs to prevent untrusted arguments from being passed to git CLI commands.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203