cve.bz

CVE-2026-42271 BerriAI LiteLLM Command Injection Vulnerability

8.7 highKEVExploitEPSS 91%Fix available

High (8.7) in BerriAI LiteLLM. In CISA KEV since 2026-06-08. EPSS 91% estimated probability of exploitation activity in the next 30 days. Fixed in litellm 1.83.7.

On this page
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.

Severity

CVSS 4.0

8.7 high
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

CVSS 3.1

8.8 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
91% (unchanged from 91% a week ago; 93% 30 days ago) estimated probability of exploitation activity in the next 30 days; 100th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA KEV
listed 2026-06-08, due 2026-06-22
CISA's assessment (SSVC)
Exploitation: active · Automatable: no · Technical impact: total, assessed 2026-05-08. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-77 Improper Neutralization of Special Elements used in a Command
CWE-78 Improper Neutralization of Special Elements used in an OS Command (OS Command Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-42271 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-42271?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-42271?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-42271 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2026-42271

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2026-42271](https://cve.bz/cve/badge/CVE-2026-42271.svg)](https://cve.bz/cve/CVE-2026-42271)

HTML:

<a href="https://cve.bz/cve/CVE-2026-42271"><img src="https://cve.bz/cve/badge/CVE-2026-42271.svg" alt="CVE-2026-42271"></a>

Affected

Versions

From the NVD's CPE matches.

ProductAffected
litellm:litellmfrom 1.74.2 before 1.83.7
redhat:openshift_aifrom 2.25 before 2.25.8
redhat:openshift_aifrom 3.3 before 3.3.4
redhat:openshift_ai3.4

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-v4p8-mg3p-g94gPyPIlitellm>=1.74.2 <1.83.71.83.7
PYSEC-2026-2599PyPIlitellm>=1.74.2 <1.83.71.83.7

Red Hat

Red Hat rates this Important.

Red Hat's statement

This is an Important flaw affecting LiteLLM, as deployed in Red Hat products like Ansible Automation Platform and OpenShift AI. Authenticated users, even with low-privilege API keys, can execute arbitrary commands on the proxy host. This is due to insufficient role checks on specific endpoints that accept server configurations with command execution parameters.

ProductPackageStateAdvisory
Red Hat OpenShift AI 2.25rhoai/odh-llama-stack-core-rhel9:1781826406Fixed 2026-06-24RHSA-2026:28960
Red Hat OpenShift AI 3.3rhoai/odh-llama-stack-core-rhel9:1782310008Fixed 2026-06-25RHSA-2026:30056
Red Hat OpenShift AI 3.4rhoai/odh-trustyai-garak-lls-provider-dsp-rhel9:1781622627Fixed 2026-06-22RHSA-2026:27784
Exploit Intelligenceexploit-intelligence-tech-preview/vulnerability-analysis-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/lightspeed-chatbot-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-27/lightspeed-chatbot-rhel9Not affected
Red Hat OpenShift AI (RHOAI)rhoai/odh-mlflow-rhel9Not affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-42271.

Public exploits

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it.

Detection rules

Ways to detect this CVE, not exploit code: the nuclei template that checks a system for it, and the Suricata and Snort rules that name it. A rule set may ship a rule turned off, so check yours by its sid.

Attack patterns (CAPEC)

  • CAPEC-6 Argument Injection Likelihood: High · Severity: High
  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-43 Exploiting Multiple Input Interpretation Layers Likelihood: Medium · Severity: High
  • CAPEC-88 OS Command Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High
  • CAPEC-40 Manipulating Writeable Terminal Devices Likelihood: High · Severity: Very High
  • CAPEC-75 Manipulating Writeable Configuration Files Likelihood: High · Severity: Very High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-136 LDAP Injection Likelihood: High · Severity: High
  • CAPEC-183 IMAP/SMTP Command Injection Severity: Medium

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-77.

References

Check your stackJSON