HIGH

CVE-2026-42271

Redhat Openshift Ai 2026-05-08 CVSS v3.1
CVSS
8.8
KEV

Description

LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format. From version 1.74.2 to before version 1.83.7, two endpoints used to preview an MCP server before saving it — POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list — accepted a full server configuration in the request body, including the command, args, and env fields used by the stdio transport. When called with a stdio configuration, the endpoints attempted to connect, which spawned the supplied command as a subprocess on the proxy host with the privileges of the proxy process. The endpoints were gated only by a valid proxy API key, with no role check. Any authenticated user — including holders of low-privilege internal-user keys — could therefore run arbitrary commands on the host. This issue has been patched in version 1.83.7.

Summary dbcve.org

LiteLLM versions 1.74.2 through 1.83.6 contain an authenticated command injection vulnerability in two MCP server preview endpoints (/mcp-rest/test/connection and /mcp-rest/test/tools/list). These endpoints accept stdio transport configuration (command, args, env) and execute the supplied command as a subprocess on the proxy host. The endpoints are protected only by a valid API key with no role-based access control, allowing any authenticated user—including low-privilege internal keys—to execute arbitrary commands with the proxy process privileges.

Mitigation

Upgrade to LiteLLM version 1.83.7 or later to patch this vulnerability. Additionally, audit and rotate any API keys that may have been compromised, and implement role-based access controls for sensitive endpoints until the upgrade is complete.

Patch Commit

Weakness (CWE)

CWE-77 Command Injection
CWE-78 OS Command Injection

EPSS Score

83.59%
Probability of exploitation in next 30 days
99.7th percentile

References

View on dbcve.org
Base CVE data derived from NVD (public domain). Enrichment by dbcve.org (CC-BY-4.0). Fetched via API.
Back to CVE