54yyyu code-mcp Command Injection Vulnerability (CVE-2026-7812)
A command injection vulnerability (CVE-2026-7812) exists in the git_operation function of 54yyyu code-mcp's MCP Tool, allowing remote attackers to execute arbitrary commands by manipulating the operation argument.
A command injection vulnerability has been identified in 54yyyu’s code-mcp, specifically affecting versions up to commit 4cfc4643541a110c906d93635b391bf7e357f4a8. The vulnerability resides in the git_operation function within src/code_mcp/server.py of the MCP Tool component. This flaw allows a remote attacker to inject and execute arbitrary commands by manipulating the operation argument. The exploit is publicly available, increasing the risk of exploitation. 54yyyu employs a continuous delivery model with rolling releases, making it difficult to pinpoint specific vulnerable versions and updated releases. The project maintainers were notified of the vulnerability through an issue report but have not yet provided a response or patch.
Attack Chain
- The attacker identifies a publicly accessible instance of 54yyyu code-mcp running a vulnerable version (<= 4cfc4643541a110c906d93635b391bf7e357f4a8).
- The attacker crafts a malicious HTTP request targeting the
git_operationfunction insrc/code_mcp/server.py. - The malicious request includes a crafted
operationargument containing shell commands. - The
git_operationfunction, without proper sanitization, passes the attacker-controlledoperationargument to a system call. - The system executes the injected commands, potentially allowing the attacker to execute arbitrary code on the server.
- The attacker gains initial access and may attempt to escalate privileges.
- The attacker moves laterally within the network, compromising other systems and data.
- The attacker achieves their final objective, which could include data exfiltration, ransomware deployment, or system disruption.
Impact
Successful exploitation of this vulnerability allows a remote attacker to execute arbitrary commands on the affected system. Due to the lack of specific versioning information and response from the vendor, the exact number of vulnerable installations is unknown. This vulnerability could lead to complete system compromise, data breaches, and potential disruption of services, impacting any organization using the affected 54yyyu code-mcp software.
Recommendation
- Inspect web server logs for suspicious POST requests to the
git_operationendpoint insrc/code_mcp/server.pycontaining shell command injection attempts, and deploy theDetect Suspicious Git Operation RequestsSigma rule. - Monitor process creation events for unusual processes spawned by the code-mcp application or related processes, using the
Detect Suspicious Processes Spawned by Code-MCPSigma rule. - Since no patch is available, consider implementing input validation and sanitization on the
operationargument within thegit_operationfunction or consider isolating the affected service until a patch is released.
Detection coverage 2
Detect Suspicious Git Operation Requests
highDetects suspicious POST requests to the git_operation endpoint in src/code_mcp/server.py, indicative of command injection attempts.
Detect Suspicious Processes Spawned by Code-MCP
mediumDetects suspicious processes spawned by the code-mcp application or related processes, which could be a sign of successful command injection.
Detection queries are kept inside the platform. Get full rules →