BerriAI LiteLLM Command Injection
CVE-2026-42271 is a high-severity improper neutralization of special elements used in a command vulnerability in litellm from BerriAI, with a CVSS 3.1 base score of 8.8 out of 10. It can be exploited remotely over the network by an attacker with a low-privileged account, without any action from a user. Affected litellm versions: >= 1.74.2, < 1.83.7. The record does not name a fixed version, so check the vendor advisory. CISA added it to the Known Exploited Vulnerabilities catalogue on June 8, 2026, which means attacks have been observed in the wild.
Attackers are already exploiting this vulnerability, according to CISA.
What to do
- Update Openshift Ai to 2.25.8 or 3.3.4, whichever matches your release line, or a later version.
- CISA's 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.
- Read the advisory on github.com for workarounds and exact fixed builds.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| BerriAI | litellm | >= 1.74.2, < 1.83.7 | Not stated |
| Red Hat | Red Hat OpenShift AI 2.25 | Not specified in the record | Not stated |
| Red Hat | Red Hat OpenShift AI 3.3 | Not specified in the record | Not stated |
| Red Hat | Red Hat OpenShift AI 3.4 | Not specified in the record | Not stated |
| Red Hat | Exploit Intelligence | Not specified in the record | Not stated |
| Red Hat | Red Hat Ansible Automation Platform 2 | Not specified in the record | Not stated |
| Red Hat | Red Hat OpenShift AI (RHOAI) | Not specified in the record | Not stated |
| Red Hat | Openshift Ai | 2.25 up to, but not including, 2.25.8; 3.3 up to, but not including, 3.3.4; 3.4 | 2.25.8, 3.3.4 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 4.0 | 8.7 | High | CNA (github.com) |
| CVSS 3.1 | 8.8 | High | NVD |
| CVSS 3.1 | 8.8 | High | CNA |
Official description
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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Neutralization of Special Elements used in a Command
The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
How developers prevent this class of flaw
- If at all possible, use library calls rather than external processes to recreate the desired functionality.
- If possible, ensure that all external commands called from the program are statically created.
- Run time: Run time policy enforcement may be used in an allowlist fashion to prevent use of any non-sanctioned commands.
More Improper Neutralization of Special Elements used in a Command vulnerabilities (CWE-77)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: active, automatable: no, technical impact: total).
- Added to CISA's Known Exploited Vulnerabilities catalogue.
- Deadline for US federal agencies to remediate, set by CISA.
- Record last changed materially (score, affected products, status or references).
References
Advisories
Patches and release notes
- github.com/BerriAI/litellm/releases/tag/v1.83.7-stableProduct, Release Notes
Third-party and government advisories
- access.redhat.com/errata/RHSA-2026:27784Third Party Advisory
- access.redhat.com/errata/RHSA-2026:28960Third Party Advisory
- access.redhat.com/errata/RHSA-2026:30056Third Party Advisory
- access.redhat.com/security/cve/CVE-2026-42271Third Party Advisory
- bugzilla.redhat.com/show_bug.cgi?id=2467924Third Party Advisory
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42271.jsonThird Party Advisory
- cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-42271US Government Resource
Other vulnerabilities in litellm
- 9.9 Critical severity
- 8.1 High severity
- 7.7 High severity
- 8.2 High severity
BerriAI LiteLLM Improper Authentication Exploited
- 7.2 High severity
- 9.8 Critical severity
Recent Improper Neutralization of Special Elements used in a Command vulnerabilities
- 8.7 High severity
- 9.8 Critical severity
- 9.8 Critical severity
- 9.8 Critical severity
- 8.8 High severity
- 9.6 Critical severity
Spotted an error? Tell us.