CVE DatabaseCVE-2026-42271
한국어 권고문 →
CVE-2026-422718.8/HIGHCISA KEVCWE-77CWE-78CWE-78

LiteLLM Proxy Server MCP Test Endpoints Remote Code Execution Vulnerability Advisory (CVE-2026-42271)

Affected Vendors
berriai
Affected Components
litellm
Published Date
2026-05-08

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

LiteLLM proxy server environments running versions 1.74.2 to before 1.83.7

Impact

Authenticated users with low-privilege API keys can execute arbitrary OS commands on the proxy host, potentially leading to full system compromise

Mitigation

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

LiteLLM versions 1.74.2 through 1.83.6

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch Application (Recommended)

Upgrade your LiteLLM deployment to version 1.83.7 or later.

bash
# 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.7

2. 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:

nginx
# 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
Recommended Security Control & Mitigation Partner
Cloudflare Enterprise & Pro WAF
To prevent unauthorized host-level command execution, immediately upgrade LiteLLM to v1.83.7+ or block the vulnerable MCP test endpoints.

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.

3-min setup · Automated Zero-Day Managed Rules
Practice Exploiting & Patching This Web Vulnerability in an Interactive Lab
Launch Hands-On Security Lab

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

NVD Original English 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.

SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
CVE-2026-42271: LiteLLM Proxy Server MCP Test Endpoints Remote Code Execution Vulnerability Advisory (CVE-2026-42271) (CVSS 8.8) | CVE Pulse