CVE-2026-42271 in litellm
LogPulse has a published detection rule for this CVE: it raises a notable when someone tries to exploit it.
What the vulnerability is
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 software: litellm, redhat openshift ai
Scores
- CVSS: 8.7 (high)
- EPSS: 94.50% chance of exploitation in the next 30 days
- CISA KEV: Known exploited, listed 2026-06-08
- Published: 2026-05-08
What LogPulse has for it
- Detection rule: Yes, published
- Agent check (vulnerable version): No
- Mitigation: Yes, see below
How to mitigate it
Upgrade LiteLLM proxy for MCP endpoint command injection and auth flaws (CVE-2026-42271, CVE-2026-59822)
Patch or upgrade. LiteLLM's MCP test endpoints run a command from the request for any key, and its MCP Streamable HTTP endpoint accepts arbitrary Bearer tokens. Upgrading LiteLLM closes both; until then keep the proxy off the internet.
Applies to: LiteLLM proxy 1.74.2 up to 1.83.7 (CVE-2026-42271) and versions listed in GHSA-7488-6r32-c95q (CVE-2026-59822).
- Check the running version: `pip show litellm` or the image tag of your LiteLLM container.
- Upgrade to 1.83.7 or later for CVE-2026-42271, and to the fixed version in advisory GHSA-7488-6r32-c95q for CVE-2026-59822 (take the newer of the two).
- Restart the proxy and confirm the version in the /health or admin UI.
- Until upgraded, block /mcp-rest/ and /mcp on the reverse proxy for everyone except admin addresses.
- Rotate LiteLLM master and virtual keys and the provider API keys stored in the proxy, and check the host for unknown processes or files.
Sources:
Source data: NIST NVD, CISA KEV and FIRST EPSS. LogPulse processes new CVEs every hour.
We build every detection with great care, but no two environments are the same. Log sources, parsing and configuration differ, so test a detection in your own environment before you rely on it.