CVE-2026-42271
High · 8.8 CISA KEVCVSS
8.8
EPSS
92.6%
Published
May 8, 2026
CISA due date
Jun 22, 2026
Cloudanix analysis
A weakly protected test feature in an AI traffic proxy could let any logged-in user run their own programs on the server, putting company AI keys and connected systems at risk until the software is updated.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Application
- Class
- Command Injection
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Authenticated command injection on the LiteLLM proxy host. Two MCP preview endpoints accepted a full stdio-transport server configuration (command, args, and env) and spawned that command as a subprocess with the privileges of the proxy process. Access was gated only by a valid proxy API key, with no role check, so low-privilege internal-user keys were sufficient for arbitrary command execution, full host confidentiality/integrity impact, and potential follow-on access to the proxy’s secrets and downstream LLM credentials.
Why it matters to the business
Compromise of the AI gateway can expose provider API keys, prompts, and enterprise data in transit through the proxy, disrupt LLM-backed applications, and give an attacker a foothold on the host running the gateway. This CVE is in CISA KEV with a remediation due date of 2026-06-22, is reported as exploited in the wild, and has a very high and rising EPSS (0.8359 → 0.9257 over 30 days). Organizations still running 1.74.2 through versions before 1.83.7 more than four months after publication face elevated operational and regulatory risk if the gateway remains unpatched.
How an attack unfolds
An attacker who already holds any valid LiteLLM proxy API key—including a low-privilege internal-user key—targets the MCP server preview API rather than a saved MCP configuration. They submit a stdio-transport configuration to POST /mcp-rest/test/connection or POST /mcp-rest/test/tools/list. The proxy treats the body as a live server to probe, launches the supplied command on the gateway host, and returns connection or tool-list results. Because those endpoints performed no role check, this yields remote command execution as the proxy user. Public reporting associates in-the-wild activity with this LiteLLM command-injection issue; follow-on abuse typically focuses on harvesting environment secrets, LLM provider keys, and using the gateway host as a pivot—not ransomware-specific campaigns.
How to fix it
Upgrade LiteLLM to 1.83.7 or later, which patches the MCP test endpoints so they no longer spawn attacker-supplied stdio commands for unprivileged callers. If an immediate upgrade is not possible, disable or block POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list at the reverse proxy or WAF, restrict proxy API keys to administrators who must manage MCP servers, rotate all proxy and provider keys that may have been exposed, and run the gateway with least privilege (non-root, tight filesystem and network controls, no unnecessary shell tools). After upgrading, rotate keys and review MCP server definitions that were added around the time of exposure.
How to confirm the fix worked
Confirm the running LiteLLM version is 1.83.7 or newer. Verify the MCP test/preview endpoints either reject stdio command/args/env from non-admin keys or no longer execute host commands during preview. Inventory API keys and roles to ensure internal-user keys cannot reach MCP administration. Review reverse-proxy/WAF rules for blocks on /mcp-rest/test/connection and /mcp-rest/test/tools/list if those paths should not be exposed. Check process-audit and container runtime policy to ensure the proxy cannot spawn unexpected children. Do not validate by sending command-execution payloads against production.
Typical attack path
- Obtain or reuse a valid LiteLLM proxy API key (including a low-privilege internal-user key).
- Authenticate to the proxy and locate the MCP preview/test API.
- Submit a stdio-transport server configuration (command, args, env) to POST /mcp-rest/test/connection or POST /mcp-rest/test/tools/list.
- The proxy spawns the supplied command as a subprocess with the proxy process privileges.
- Use the resulting host access to read proxy configuration, environment variables, and stored provider credentials.
- Abuse stolen keys or the compromised gateway to access downstream LLM APIs or move laterally from the host.
How to detect it
Hunt whether this was already abused by correlating authenticated POST requests to /mcp-rest/test/connection and /mcp-rest/test/tools/list with request bodies that include stdio transport fields (command, args, env), especially from internal-user or otherwise low-privilege keys. On the proxy host, look for the LiteLLM/gateway process spawning short-lived unexpected children (shells, scripting runtimes, recon or credential-file access) at the same timestamps. Review API gateway, reverse-proxy, and application logs for those paths; container runtime, auditd/EDR process-creation events, and secret-access logs for the proxy service account; and outbound connections from the gateway host that are inconsistent with normal LLM provider traffic. Public reporting of in-the-wild exploitation of this LiteLLM command-injection issue should raise priority for any historical hits after 2026-05-08. Successful abuse may not leave a unique malware family; prioritize request+process correlation and subsequent credential use.
- POST /mcp-rest/test/connection
- POST /mcp-rest/test/tools/list
- /mcp-rest/test/connection
- /mcp-rest/test/tools/list
- "transport":"stdio"
- "command":
- stdio transport MCP test request from internal-user API key
- litellm spawning unexpected child process (sh, bash, python, curl, wget) coincident with MCP test API call
What your security team should do
- Treat this as KEV-priority: patch all LiteLLM 1.74.2–<1.83.7 instances to 1.83.7+ immediately given in-the-wild exploitation and the 2026-06-22 CISA due date.
- Block or authenticate-and-restrict the MCP test endpoints at the edge until every instance is upgraded.
- Rotate LiteLLM proxy keys and all LLM provider credentials stored in the gateway environment or config.
- Hunt historical access logs and process telemetry for the detection guidance and IOCs below; assume keys are burned if those endpoints were reachable to internal-user keys.
- Run the proxy as a non-root user with no unnecessary interpreters or cloud-credential files on the host, and segment it from sensitive networks.
- Add regression tests and WAF/positive-security rules so MCP preview APIs cannot accept stdio command execution from low-privilege keys.
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-114575 A flaw has been found in TOTOLINK A950RG 4.1.2cu.5268_B20221104. CWE-77
- CVE-2026-112942 launch-editor allows users to open files with line numbers in editor from Node.js. CWE-77
- CVE-2026-55453 OpenPrinting CUPS is an open source printing system for Linux and other Unix-like… CWE-77
- CVE-2026-102827 simple-git, an interface for running git commands in any node.js application, enables… CWE-77
- CVE-2026-102826 simple-git, an interface for running git commands in any node.js application, enables… CWE-77
- CVE-2026-79945 Dell SCG 5.0 Appliance versions prior to 5.36.00.16 and Dell SCG 5.0 Application versions… CWE-77
- CVE-2026-79741 Dell SCG 5.0 Appliance versions prior to 5.36.00.16 and Dell SCG 5.0 Application versions… CWE-77
- CVE-2026-78493 Dell SCG 5.0 Appliance versions prior to 5.36.00.16 and Dell SCG 5.0 Application versions… CWE-77