OS Command Injection in LiteLLM - CVE-2026-42271
Published: April 27, 2026 / Updated: June 8, 2026
LiteLLM
Detailed vulnerability description
The vulnerability allows a remote user to execute arbitrary commands on the host.
The vulnerability exists due to improper neutralization of special elements used in an os command in the MCP stdio test endpoints when processing a full server configuration for stdio transport. A remote user can submit a specially crafted request containing command, args, and env fields to execute arbitrary commands on the host.
The issue affects POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list, and the supplied command is spawned as a subprocess with the privileges of the proxy process.