Arbitrary Cmd Exec via /mcp-rest/test/* in LiteLLM 1.74.2-<1.83.7
CVE-2026-42271 Published on May 8, 2026

LiteLLM: Authenticated command execution via MCP stdio test endpoints
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.

NVD

Known Exploited Vulnerability

This BerriAI LiteLLM Command Injection Vulnerability is part of CISA's list of Known Exploited Vulnerabilities. BerriAI LiteLLM contains a command injection vulnerability that could allow any authenticated user, including holders of low-privilege internal-user keys, to run arbitrary commands on the host.

The following remediation steps are recommended / required by June 22, 2026: Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.

Vulnerability Analysis

CVE-2026-42271 can be exploited with network access, and requires small amount of user privileges. This vulnerability is considered to have a low attack complexity. This vulnerability is known to be actively exploited by threat actors. The potential impact of an exploit of this vulnerability is considered to be very high.

Attack Vector:
NETWORK
Attack Complexity:
LOW
Privileges Required:
LOW
User Interaction:
NONE
Scope:
UNCHANGED
Confidentiality Impact:
HIGH
Integrity Impact:
HIGH
Availability Impact:
HIGH

Weakness Types

What is a Command Injection Vulnerability?

The software constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.

CVE-2026-42271 has been classified to as a Command Injection vulnerability or weakness.

What is a Shell injection Vulnerability?

The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.

CVE-2026-42271 has been classified to as a Shell injection vulnerability or weakness.


Products Associated with CVE-2026-42271

Want to know whenever a new CVE is published for Red Hat products? stack.watch will email you.

 
 
 

Affected Versions

BerriAI litellm: Red Hat OpenShift AI 2.25: Red Hat OpenShift AI 3.3: Red Hat OpenShift AI 3.4: Red Hat Exploit Intelligence: Red Hat Ansible Automation Platform 2: Red Hat OpenShift AI (RHOAI):

Exploit Probability

EPSS
53.70%
Percentile
98.86%

EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.