LiteLLM: Authenticated command execution via MCP stdio test endpoints
Affects LiteLLM 1.74.2 up to but not including 1.83.7 when MCP stdio test endpoints receive a stdio configuration with command and args. Fixed in 1.83.7.
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Listed in CISA KEV
- How many real-world setups can hit the bug, from the vendor's advisory and CISA data. It does not know your setup.What do these mean? →
- Actively exploited
- Fix
- Fixed in 1.83.7
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
LiteLLM, an open-source proxy server that routes calls to LLM APIs, is affected. Any user holding a valid proxy API key, including low-privilege internal-user keys, can run arbitrary commands on the host running the proxy, with the same privileges as the proxy process.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original 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.
Timeline
- CVE published
- Added to CISA KEV
CISA has evidence of exploitation in the wild
- CISA remediation deadline
Due date for US federal agencies to patch
- Record last updated
- EPSS reached 10%
FIRST estimates at least a 10% chance of exploitation in the next 30 days
Affected versions
- BerriAI litellm
From 1.74.2 · fixed in 1.83.7
- litellmPyPI
From 1.74.2 · fixed in 1.83.7
References 2
GitHub · BerriAI/litellm
Questions about CVE-2026-42271
What does this mean?
An authenticated user can make the LiteLLM proxy run arbitrary commands on the host, with the privileges of the proxy process. The test endpoints attempt to connect when called with a stdio configuration, which is how the commands run.Source: github.com
Am I affected, and how do I check?
Versions 1.74.2 up to but not including 1.83.7 are affected, and only when the request uses a stdio transport configuration with command and args on the test endpoints. Check the installed LiteLLM version against that range to see whether it falls within it.Source: github.com
What should I do about it?
Upgrade to LiteLLM 1.83.7, which contains the fix. If an upgrade cannot happen right away, block POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list at the reverse proxy or API gateway.Source: github.com
Is it being exploited?
Yes. CISA added it to its Known Exploited Vulnerabilities catalog on 2026-06-08, which means it has evidence of attacks. No public exploit code is tracked.Source: cisa.gov, cve.now feed data