CVE-2026-42271: Authenticated command execution in LiteLLM MCP preview endpoints
- Vendors
- LitellmRed Hat
CVE-2026-42271 is an authenticated arbitrary command execution vulnerability affecting LiteLLM versions 1.74.2 through versions before 1.83.7. Two Model Context Protocol (MCP) server preview endpoints accept complete server configurations, including attacker-controlled command, args, and env fields for the stdio transport. Testing a stdio connection launches the configured command as a subprocess with the privileges of the LiteLLM proxy process. The endpoints validate the caller's proxy API key but omit role-based authorization, allowing even low-privilege internal users to execute arbitrary commands on the proxy host. Version 1.83.7 adds the required administrative role checks.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation compromises confidentiality, integrity, and availability within the permissions of the proxy process. Attackers can execute code, access environment variables and provider API credentials, alter accessible data, disrupt services, and deploy malware. Stolen credentials and access to connected services can enable unauthorized API consumption, data theft, and lateral movement. Host takeover is possible where the proxy process has sufficient privileges. Chaining this vulnerability with the separate Starlette authentication-bypass vulnerability CVE-2026-48710 can enable unauthenticated remote code execution.
Mitigation
If you can’t patch tonight, do this now.
If upgrading is not immediately possible, block POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list at the reverse proxy or API gateway. Remove administrative and test endpoints from direct internet exposure and restrict access through a VPN or independently authenticated reverse proxy. To reduce exposure to the associated authentication-bypass chain, enforce an allowlist of accepted Host header values. Review endpoint access logs and unexpected subprocess activity for exploitation evidence.
Remediation
Patch, then assume compromise.
Upgrade LiteLLM to version 1.83.7 or later. The fix requires the PROXY_ADMIN role for POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list, aligning their authorization with the MCP server save endpoint. For deployments also affected by CVE-2026-48710, upgrade Starlette to version 1.0.1 or later. Rotate the master key and all provider keys held by exposed vulnerable instances, and investigate possible compromise.
Exploits
2 exploits validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit; 1 not yet analyzed, such as Exploit-DB entries.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2026-42271 exploited in the wild?
- Yes. As of Nov 24, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Jun 8, 2026.
- Is there a public exploit for CVE-2026-42271?
- Yes. Mallory tracks 2 public exploits or proofs of concept for CVE-2026-42271, the earliest disclosed May 20, 2026.
- Is there a patch for CVE-2026-42271?
- Upgrade LiteLLM to version 1.83.7 or later. The fix requires the PROXY_ADMIN role for POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list, aligning their authorization with the MCP server save endpoint.
- What products are affected by CVE-2026-42271?
- Litellm and Red Hat Openshift Ai.
- How severe is CVE-2026-42271?
- CVE-2026-42271 has a CVSS v4 score of 8.7 (High) and an EPSS score of 91.4% (100th percentile) as of Nov 24, 2026.
Recent activity
167 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.