dvladimirov MCP Git Search API Command Injection Vulnerability
A command injection vulnerability (CVE-2026-7211) exists in the GitSearchRequest function of dvladimirov MCP up to version 0.1.0, allowing a remote attacker to execute arbitrary commands by manipulating the repo_url or pattern argument.
A command injection vulnerability has been identified in dvladimirov MCP (Monitoring and Configuration Platform) up to version 0.1.0. This vulnerability resides within the GitSearchRequest function located in the mcp_server.py file, specifically affecting the Git Search API component. Successful exploitation allows a remote attacker to inject and execute arbitrary commands on the underlying system. The vulnerability stems from insufficient sanitization of user-supplied input to the repo_url or pattern arguments. Publicly available exploits exist, increasing the risk of active exploitation. The project maintainers were notified through an issue report but have not yet addressed the vulnerability.
Attack Chain
- The attacker identifies an instance of dvladimirov MCP running a version up to 0.1.0 with the Git Search API enabled.
- The attacker crafts a malicious HTTP request targeting the Git Search API endpoint (
/gitsearch). - Within the request, the attacker injects a command injection payload into either the
repo_urlorpatternargument. This payload leverages shell metacharacters (e.g.,;,|,&&) to chain malicious commands. - The MCP server receives the request and passes the unsanitized
repo_urlorpatternvalue to the GitSearchRequest function inmcp_server.py. - The
GitSearchRequestfunction executes the injected command via a system call, effectively bypassing intended functionality. - The attacker gains arbitrary command execution on the server, potentially allowing them to read sensitive files, modify system configurations, or establish a reverse shell.
- The attacker uses the reverse shell to further explore the network and escalate privileges.
Impact
Successful exploitation of this command injection vulnerability allows a remote attacker to execute arbitrary commands on the affected system. This can lead to complete system compromise, including data theft, modification, or destruction. Given the nature of MCP, which likely manages configurations and monitors other systems, a successful attack could cascade to other parts of the infrastructure, potentially affecting numerous systems across the network.
Recommendation
- Apply input validation and sanitization to the
repo_urlandpatternparameters within theGitSearchRequestfunction to prevent command injection. - Deploy the Sigma rule
Detect MCP Git Search API Command Injection Attemptto detect exploitation attempts targeting CVE-2026-7211. - Monitor web server logs for suspicious requests containing shell metacharacters in the
repo_urlorpatternparameters as outlined in the Sigma rule and overview sections. - Consider isolating or taking offline affected MCP instances until a patch is available to mitigate the risks associated with CVE-2026-7211.
Detection coverage 2
Detect MCP Git Search API Command Injection Attempt
criticalDetects potential command injection attempts against the dvladimirov MCP Git Search API by identifying shell metacharacters in the repo_url or pattern parameters.
Detect MCP Git Search API Access
infoDetects access to the dvladimirov MCP Git Search API.
Detection queries are kept inside the platform. Get full rules →