HexStrike AI MCP Server Command Injection Vulnerability

Vulnerability

A command injection vulnerability has been identified in the HexStrike AI MCP server, specifically in the EnhancedCommandExecutor class. This issue arises when a command-line argument starting with a semi-colon is sent to an API endpoint. The injected command is executed with the same privileges as the MCP server, typically root. The vulnerability exists because the server's default configuration does not sanitize these arguments.

Impact

Exploitation of this vulnerability allows for command injection, with executed commands running in the context of the MCP server's privileges, usually as root.

Reproduction

To reproduce this vulnerability, send a POST request to the '/api/tools/nmap' endpoint with a JSON payload. The 'additional_args' field must include a semi-colon followed by the command to be executed, such as 'echo `whoami`' or 'cat /etc/passwd'. The response will include the output of the injected command, demonstrating successful exploitation.

Added: Nov 30, 2025, 10:17 PM
Updated: Nov 30, 2025, 10:17 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
10.0
exploitability
8.7
remediation
0.0
relevance
1.3
threat
6.4
urgency
2.9
incentive
5.8

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