Sovra Recon·Actively exploited

CVE-2026-42271BerriAI LiteLLM Command Injection Vulnerability

At a glance

CVE-2026-42271 is a high-severity vulnerability (CVSS score 8.7) affecting LiteLLM (BerriAI). CISA has confirmed that attackers have been exploiting it since June 8, 2026.

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.

Details

The vulnerability in detail

CVE ID
CVE-2026-42271
Vendor
BerriAI
Product
LiteLLM
Severity (CVSS)
High · 8.7 / 10
Published
May 8, 2026
Actively exploited
Yes, confirmed by CISA on June 8, 2026
Used in ransomware
Not reported
Weakness type (CWE)
CWE-78, CWE-77

What to do

How to protect against CVE-2026-42271

  • Check whether you are affected: identify the installed versions of the product and compare them with the vendor's security advisory.
  • Apply the vendor's patch as a priority on Internet-facing systems, since this vulnerability is already being exploited.
  • If no patch is available, apply the published workarounds or take the service off the Internet.
  • Look for signs of compromise: a vulnerability exploited before you patched may already have been used. Review your logs and the indicators published by the vendor.

Sources

Official descriptions from NVD and CISA, in their original wording.

Patching a CVE is not enough.

The vulnerabilities specific to your application have no CVE. Our AI agents hunt for them by actually attacking your systems.