automagik-genie Command Injection Vulnerability in MCP Server Allowing Remote Code Execution

Vulnerability

A command injection vulnerability has been identified in the automagik-genie MCP Server version 2.5.27. This vulnerability allows attackers to execute arbitrary commands on the server where the MCP process is running. The issue arises in the 'readTranscriptFromCommit' function within 'dist/mcp/server.js', specifically when the 'view_task' command is used to read from an external FORGE_BASE_URL. The vulnerability is exploited by injecting malicious data through the Forge API, which is then executed on the server via unsanitized command interpolation.

Impact

Exploitation of this vulnerability leads to remote code execution on the server, allowing attackers to execute arbitrary commands as the user running the MCP server process. This could be used to read sensitive files, access internal network services, or modify the server environment, such as installing backdoors or altering scheduled tasks.

Reproduction

To reproduce this vulnerability, set up a mock Forge server that simulates a malicious backend. This server should return poisoned data that includes shell metacharacters in the 'after_head_commit' field. Then, use the automagik-genie MCP client to call the 'view_task' command, which will trigger the command injection by executing the injected payload on the server.

Remediation

Users are advised to update to the patched version of automagik-genie, if available. If a patch is not yet released, consider removing the MCP server or blocking the 'view_task' command until the vulnerability can be addressed.

Added: May 11, 2026, 6:48 PM
Updated: May 11, 2026, 6:48 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
7.5
exploitability
7.7
remediation
0.0
relevance
8.0
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.