← Vulnerability feed

Vulnerability record · CVE-2026-42271 · published 8 May 2026

CVE-2026-42271: LiteLLM MCP test endpoints allow authenticated OS command injection

Litellm · Litellm

LiteLLM versions 1.74.2 through before 1.83.7 expose two MCP preview endpoints (POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list) that accept a full server configuration, including the command, args and env fields of the stdio transport. When given a stdio configuration, the endpoints spawn the supplied command as a subprocess on the proxy host with the proxy process's privileges. The endpoints were gated only by a valid proxy API key with no role check, so any authenticated user could execute arbitrary commands.

8.7 CVSS 4.0 High CISA KEV since 8 Jun 2026 EPSS 13% · top 3.9% CWE-77 · Command injectionCWE-78 · OS command injection
8.7CVSS 4.0 base score
13%EPSS exploitation probability, 30 days
YesIn CISA KEV, fix deadline passed
2Affected product versions listed by NVD
9References
15 Jul 2026Last modified by NVD

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.

CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 17 September 2026. Confidence: high.

critical priorityThe flaw allows authenticated remote command execution on the AI gateway host, is listed in CISA KEV with a near-term due date, and has an EPSS probability above 0.83.

What it is

LiteLLM versions 1.74.2 through before 1.83.7 expose two MCP preview endpoints (POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list) that accept a full server configuration, including the command, args and env fields of the stdio transport. When given a stdio configuration, the endpoints spawn the supplied command as a subprocess on the proxy host with the proxy process's privileges. The endpoints were gated only by a valid proxy API key with no role check, so any authenticated user could execute arbitrary commands.

Impact

An attacker with any valid proxy API key, including a low-privilege internal-user key, gains arbitrary command execution on the LiteLLM proxy host under the proxy process's privileges. This enables host compromise, data theft and lateral movement from the AI gateway.

Attack surface

Reachable over the network via HTTP POST to the two MCP test endpoints; only a valid proxy API key is required, with no role check and no user interaction. The CVSS vector confirms network attack, low privileges and no UI.

Exploitation

CVE-2026-42271 was added to CISA KEV on 2026-06-08 with a 2026-06-22 remediation due date, and EPSS gives a 30-day probability of 0.83594 (99.669th percentile). No ransomware campaign use is documented in the record.

What to do

  • Upgrade LiteLLM to version 1.83.7 or later, which contains the patch.
  • Apply the Red Hat errata (RHSA-2026:27784, RHSA-2026:28960, RHSA-2026:30056) for OpenShift AI deployments.
  • If immediate patching is not possible, restrict network access to the MCP test endpoints and rotate or revoke low-privilege proxy API keys.
  • Enforce role-based authorization on administrative and MCP preview endpoints so internal-user keys cannot reach them.
  • Follow CISA KEV required action: apply vendor mitigations, follow BOD 22-01 guidance for cloud services, or discontinue use of the product.

Detection

  • Monitor proxy and application logs for POST requests to /mcp-rest/test/connection and /mcp-rest/test/tools/list, especially with stdio configurations containing command, args or env fields.
  • Alert on unexpected child processes spawned by the LiteLLM proxy process, particularly shells or interpreters.
  • Audit proxy API key usage for low-privilege internal-user keys calling MCP test endpoints.
  • Review host process telemetry for command execution originating from the LiteLLM service account.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Exploitation in the wild

CISA added CVE-2026-42271 to the Known Exploited Vulnerabilities catalog on 8 June 2026 as "BerriAI LiteLLM Command Injection Vulnerability". Required action: Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable. Federal deadline 22 June 2026.

Affected products

2 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2026-42271 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.4CVE-2026-33634Trivy and trivy-action supply chain compromise via malicious release and tagsA threat actor used compromised credentials to publish a malicious Trivy v0.69.4 release, force-push 76 of 77 version tags in aquasecurity/trivy-acti…KEVEPSS 1.7%analysed9.3CVE-2026-42208LiteLLM proxy SQL injection in API key checkLiteLLM versions 1.81.16 to before 1.83.7 build a database query for proxy API key checks by concatenating the caller-supplied key into the query tex…KEVEPSS 5.8%analysed8.8CVE-2026-59822LiteLLM MCP endpoint auth bypass via OAuth2 passthrough fallbackLiteLLM's MCP Streamable HTTP endpoint, prior to 1.84.0, let an unauthenticated attacker send a fabricated Authorization header that triggered an OAu…KEVEPSS 0.84%analysed6.5CVE-2026-48710Starlette Host header validation flaw enables request.url path mismatchStarlette before 1.0.1 did not validate the HTTP Host header before using it to rebuild request.url, so a malformed Host value could make request.url…KEVEPSS 7.1%analysed9.9CVE-2026-5483Redhat openshift ai vulnerabilityA flaw was found in odh-dashboard in Red Hat Openshift AI. This vulnerability in the `odh-dashboard` component of Red Hat OpenShift AI (RHOAI) allows…EPSS 0.65%9.8CVE-2024-5751Litellm code injection vulnerabilityBerriAI/litellm version v1.35.8 contains a vulnerability where an attacker can achieve remote code execution. The vulnerability exists in the `add_de…EPSS 0.88%9.8CVE-2024-2952Litellm vulnerabilityBerriAI/litellm is vulnerable to Server-Side Template Injection (SSTI) via the `/completions` endpoint. The vulnerability arises from the `hf_chat_te…EPSS 1.3%9.5CVE-2026-49468Litellm authentication bypass by spoofing vulnerabilityLiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format. Prior to 1.84.0, a Host-header parsing flaw in the LiteLLM prox…EPSS 0.82%

Source: NIST National Vulnerability Database (record CVE-2026-42271), CISA KEV, FIRST EPSS (scores of 2026-09-27). This page is refreshed as NVD updates the record.