Article Details

Scrape Timestamp (UTC): 2026-01-20 14:00:00.452

Source: https://thehackernews.com/2026/01/three-flaws-in-anthropic-mcp-git-server.html

Original Article Text

Click to Toggle View

Three Flaws in Anthropic MCP Git Server Enable File Access and Code Execution. A set of three security vulnerabilities has been disclosed in mcp-server-git, the official Git Model Context Protocol (MCP) server maintained by Anthropic, that could be exploited to read or delete arbitrary files and execute code under certain conditions. "These flaws can be exploited through prompt injection, meaning an attacker who can influence what an AI assistant reads (a malicious README, a poisoned issue description, a compromised webpage) can weaponize these vulnerabilities without any direct access to the victim's system," Cyata researcher Yarden Porat said in a report shared with The Hacker News. Mcp-server-git is a Python package and an MCP server that provides a set of built-in tools to read, search, and manipulate Git repositories programmatically via large language models (LLMs). The security issues, which have been addressed in versions 2025.9.25 and 2025.12.18 following responsible disclosure in June 2025, are listed below - Successful exploitation of the above vulnerabilities could allow an attacker to turn any directory on the system into a Git repository, overwrite any file with an empty diff, and access any repository on the server. In an attack scenario documented by Cyata, the three vulnerabilities could be chained with the Filesystem MCP server to write to a ".git/config" file (typically located within the hidden .git directory) and achieve remote code execution by triggering a call to git_init by means of a prompt injection. In response to the findings, the git_init tool has been removed from the package and adds extra validation to prevent path traversal primitives. Users of the Python package are recommended to update to the latest version for optimal protection. "This is the canonical Git MCP server, the one developers are expected to copy," Shahar Tal, CEO and co-founder of Agentic AI security company Cyata, said. "If security boundaries break down even in the reference implementation, it's a signal that the entire MCP ecosystem needs deeper scrutiny. These are not edge cases or exotic configurations, they work out of the box."

Daily Brief Summary

VULNERABILITIES // Anthropic's Git Server Vulnerabilities Allow Code Execution and File Access

Three security vulnerabilities were identified in Anthropic's mcp-server-git, potentially allowing unauthorized file access and remote code execution.

These flaws can be exploited via prompt injection, where attackers manipulate AI assistant inputs such as README files or poisoned web pages.

The vulnerabilities could let attackers transform directories into Git repositories and overwrite files, posing significant security risks.

Cyata's research demonstrated a potential attack chain using the Filesystem MCP server to achieve remote code execution.

In response, Anthropic has removed the git_init tool and enhanced validation measures to counter path traversal attacks.

The vulnerabilities were responsibly disclosed in June 2025, with fixes implemented in versions 2025.9.25 and 2025.12.18.

Users are urged to update to the latest version of the Python package to ensure protection against these vulnerabilities.

This incident raises concerns about the security of the broader MCP ecosystem, necessitating further scrutiny and vigilance.