CVE-2026-42271 in Litellm and 1 more product
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 bo...
Affects 2 products from 2 vendors. Facts below cite their sources.
Remotely exploitable over the network, low complexity, low privileges required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Litellm | Litellm | ≥ 1.74.2, < 1.83.7 |
| Redhat | Openshift Ai | 3.4 ≥ 2.25, < 2.25.8 ≥ 3.3, < 3.3.4 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Vendor PSIRT: [email protected]
Exploitation
| CISA known-exploited | Yes added 2026-06-08 |
|---|---|
| Public exploit | Not confirmed |
Official 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.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2026-42271 |
|---|---|
| BreachSpider ID | BS-2026-GLOBAL-271090-H |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Published | 2026-05-08 |
| Last modified | 2026-10-26 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-77: Command Injection
Attacker injects operating system commands through application inputs passed to a shell or system call.
CWE-78: OS Command Injection
Attacker injects OS commands through application inputs passed to system() or equivalent calls, leading to arbitrary command execution.
Related attack patterns (CAPEC)
CAPEC-43 Exploiting Multiple Input Interpretation Layers via CWE-77, CWE-78
CAPEC-76 Manipulating Web Input to File System Calls via CWE-77
CAPEC-108 Command Line Execution through SQL Injection via CWE-78
CAPEC-6 Argument Injection via CWE-78
CAPEC-15 Command Delimiters via CWE-77, CWE-78
Show all 11
CAPEC-40 Manipulating Writeable Terminal Devices via CWE-77
CAPEC-75 Manipulating Writeable Configuration Files via CWE-77
CAPEC-88 OS Command Injection via CWE-78
CAPEC-136 LDAP Injection via CWE-77
CAPEC-183 IMAP/SMTP Command Injection via CWE-77
CAPEC-248 Command Injection via CWE-77
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
LiteLLM versions 1.74.2 to 1.83.6 are vulnerable to command injection due to improper validation of user input in the POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list endpoints, allowing attackers to execute arbitrary commands on the server.
An attacker can exploit this vulnerability by sending a malicious request to the affected endpoints with a specially crafted server configuration in the request body. The 'command', 'args', and 'env' fields are not properly sanitized, enabling the execution of arbitrary commands on the server.
Questions
What is CVE-2026-42271?
LiteLLM versions 1.74.2 to 1.83.6 are vulnerable to command injection due to improper validation of user input in the POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list endpoints, allowing attackers to execute arbitrary commands on the server.
What is the CVSS score for CVE-2026-42271?
CVE-2026-42271 has CVSS 8.8 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. EPSS: 7.3%.
Is CVE-2026-42271 actively exploited?
Yes. CVE-2026-42271 is in the CISA known-exploited catalog (added 2026-06-08). Active exploitation confirmed. Immediate patching required.
How do I remediate CVE-2026-42271?
Priority: IMMEDIATE. PSIRT: [email protected]
What systems are affected by CVE-2026-42271?
CVE-2026-42271 affects Litellm Litellm; Redhat Openshift Ai.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Litellm","product":"Litellm","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-10-26.