CVE-2026-42271: BerriAI LiteLLM Command Injection Vulnerability

Published May 8, 2026
·
Updated

BerriAI LiteLLM contains a command injection vulnerability that could allow any authenticated user, including holders of low-privilege internal-user keys, to run arbitrary commands on the host.

Other sources

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.

NVD

Affected Software

6 affected components
LiteLLM LiteLLM>=1.74.2<1.83.7
BerriAI LiteLLM
LiteLLM LiteLLM>=1.74.2<1.83.7
redhat OpenShift AI>=2.25<2.25.8
redhat OpenShift AI>=3.3<3.3.4
redhat OpenShift AI=3.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade BerriAI LiteLLM to a version that resolves this vulnerability.

    Fixed in 1.83.7

Event History

May 8, 2026
CVE Published
via MITRE·03:35 AM
Data Sourced
via MITRE·03:35 AM
DescriptionWeakness
Data Sourced
via Red Hat·04:02 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·04:16 AM
RemedyDescriptionSeverityWeaknessAffected Software
Jun 8, 2026
Known Exploited
via CISA·12:00 AM
Data Sourced
via CISA·12:00 AM
RemedyDescriptionAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-42271?

CVE-2026-42271 has been classified with a high severity level due to the potential for authenticated command execution.

2

How do I fix CVE-2026-42271?

To mitigate CVE-2026-42271, upgrade to LiteLLM version 1.83.7 or later.

3

What are the affected versions of LiteLLM for CVE-2026-42271?

LiteLLM versions from 1.74.2 to before 1.83.7 are affected by CVE-2026-42271.

4

What type of vulnerability is CVE-2026-42271?

CVE-2026-42271 is classified as an authenticated command execution vulnerability.

5

Which endpoints are involved in CVE-2026-42271?

CVE-2026-42271 involves the POST /mcp-rest/test/connection and related preview endpoints.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203