BerriAI LiteLLM Command Injection Vulnerability
BerriAI — litellm
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.
8.7
80.2%
Vector breakdown
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- Present
- Privileges required
- Low
- User interaction
- None
- Confidentiality (Vulnerable System)
- High
- Integrity (Vulnerable System)
- High
- Availability (Vulnerable System)
- High
- Confidentiality (Subsequent System)
- High
- Integrity (Subsequent System)
- None
- Availability (Subsequent System)
- None
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:N/SA:N
- Published
- May 8, 2026
- Modified
- Jul 15, 2026
- Added to KEV
- Jun 8, 2026
- Federal patch due
- Jun 22, 2026
CISA required action
Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
Weakness classification
Proof-of-concept & exploitation references
Weaponization
Public repositories whose name or description references CVE-2026-42271, found via a live GitHub search at request time. These are community-sourced signals, not a verified working exploit - cross-check each one before relying on it, and treat higher star counts and recent activity as (weak) corroboration, not proof.
No public GitHub repositories referencing CVE-2026-42271 were found at last check. Absence here is not proof no exploit exists - see the references below for vendor advisories and write-ups.
References
Frequently asked questions
What is CVE-2026-42271?
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.
How severe is CVE-2026-42271?
CVE-2026-42271 has a CVSS base score of 8.7 out of 10 (CVSS 4.0).
Is CVE-2026-42271 actively exploited in the wild?
Yes. CVE-2026-42271 is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, added Jun 8, 2026, meaning CISA has confirmed evidence of active exploitation.
What is the EPSS score for CVE-2026-42271?
80.2% - meaning FIRST.org's EPSS model estimates a 80.2% probability this vulnerability will be exploited in the wild within 30 days (100% percentile among all scored CVEs).
Is there exploit tooling available for CVE-2026-42271?
Yes - a public Nuclei template referencing CVE-2026-42271 exist in public repositories we checked.
What type of vulnerability is CVE-2026-42271?
CVE-2026-42271 is classified under CWE-77, CWE-78 (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')).
Cross-checked against
Impactr finds and proves whether CVE-2026-42271 - or flaws like it - are actually reachable in your own web apps and APIs, with a reproducible exploit as evidence.
Join the waitlist