LiteLLM Proxy Server MCP Test Endpoints Remote Code Execution Vulnerability Advisory (CVE-2026-42271)
Executive & SecOps Summary
SECOPS ASSESSMENTLiteLLM proxy server environments running versions 1.74.2 to before 1.83.7
Authenticated users with low-privilege API keys can execute arbitrary OS commands on the proxy host, potentially leading to full system compromise
Immediately upgrade LiteLLM to the patched version 1.83.7 or later, and restrict access to the vulnerable endpoints in the interim
Affected Products & Version Scope
Remediation & Live Workaround Commands
PATCH & WORKAROUND1. Official Patch Application (Recommended)
Upgrade your LiteLLM deployment to version 1.83.7 or later.
# For pip-based installations
pip install --upgrade litellm>=1.83.7
# For Docker-based deployments, update your image tag in Dockerfile or docker-compose.yml
# image: ghcr.io/berriai/litellm:v1.83.72. Temporary Mitigation (If patching is delayed)
If an immediate upgrade is not feasible, block all external traffic to the vulnerable endpoints using a reverse proxy (e.g., Nginx) or a Web Application Firewall (WAF).
Nginx Configuration Example:
# Block access to vulnerable MCP test endpoints
location ~* ^/mcp-rest/test/(connection|tools/list) {
deny all;
return 403;
}WAF Rule Configuration:
- Target URIs:
/mcp-rest/test/connection,/mcp-rest/test/tools/list - HTTP Method:
POST
Block Exploits Instantly with Managed Virtual Patching Rules
Can't patch production immediately? Deploy managed WAF rules at the edge to intercept RCE, SQLi, and deserialization payloads before they hit your origin server.
Technical Root Cause & Exploitation Mechanics
LiteLLM is an open-source proxy server (AI Gateway) designed to streamline LLM API calls. A critical vulnerability (CVE-2026-42271) exists in two endpoints used to preview Model Context Protocol (MCP) servers before saving them: POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list.
These endpoints accept a full server configuration within the request body, including the command, args, and env fields utilized by the stdio transport mechanism. When invoked, the application attempts to establish a connection by spawning the supplied command as a subprocess on the host machine under the privileges of the active proxy process.
Because these endpoints only require a valid proxy API key and lack proper role-based access control (RBAC) checks, any authenticated user—including those holding low-privilege internal-user keys—can exploit this behavior to achieve Remote Code Execution (RCE). Given its high EPSS score (0.94) and KEV status, this vulnerability poses an immediate threat to deployments.
Official Vendor Advisories & References
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.
Subscribe to Daily Vulnerability Briefings & KEV Alerts
Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.