Skip to main content
← All vulnerabilities
CVE-2026-42271PYSEC-2026-2599GHSA-V4P8-MG3P-G94G

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
published
Listed in CISA KEV
Actively exploited
Fix
Fixed in 1.83.7
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

  1. CVE published
  2. Added to CISA KEV

    CISA has evidence of exploitation in the wild

  3. CISA remediation deadline

    Due date for US federal agencies to patch

  4. Record last updated
  5. 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

FAQ

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