LiteLLM, a proxy server used as an AI Gateway for Large Language Model APIs, contains a flaw where two endpoints used to preview an MCP server before saving it—'POST /mcp-rest/test/connection' and 'POST /mcp-rest/test/tools/list'—accept a full server configuration in the request body. This includes the `command`, `args`, and `env` fields used by the stdio transport. When a stdio configuration is provided, the endpoints spawn the supplied command as a subprocess on the proxy host with the privileges of the proxy process. Because these endpoints only require a valid proxy API key and lack role verification, any authenticated user, including those with low-privilege internal-user keys, can execute arbitrary commands on the host.