CVE-2026-42271 — BerriAI LiteLLM Command Injection Vulnerability
Research article
BerriAI LiteLLM Command Injection Vulnerability (CVE-2026-42271)
| CVE | CVE-2026-42271 |
|---|---|
| Vendor and product | BerriAI litellm; Red Hat OpenShift AI 2.25; Red Hat OpenShift AI 3.3 |
| Published | November 18, 2026 01:25 UTC |
| Research cut-off | November 18, 2026 01:15 UTC |
| Sources reviewed | 5: NVD record (last modified 2026-10-26); CISA KEV catalog; vendor advisory page (github.com); FIRST EPSS (2026-11-16); 1 news report |
Executive summary
CVE-2026-42271 affects BerriAI LiteLLM versions >= 1.74.2 and < 1.83.7, with CVSS 3.1 base score 8.8 HIGH, scored by nvd@nist.gov [1]. The vulnerability allows authenticated users to execute arbitrary commands on the host, as confirmed by CISA [2]. Immediate mitigation includes applying the fix in version 1.83.7 [3].
Key points
- CVE-2026-42271 allows authenticated users to execute arbitrary commands on the host [3].
- The CVSS 3.1 base score is 8.8 HIGH, scored by nvd@nist.gov (Primary) [1].
- The vulnerability affects BerriAI LiteLLM versions >= 1.74.2 and < 1.83.7 [1].
- CISA has evidence of exploitation in the wild [2].
- The fix is available in version 1.83.7 [3].
Vulnerability identification
| CVE ID | Vendor | Product | CWE | CVSS 4.0 | CVSS 3.1 | Published | Last Modified | Record Status |
|---|---|---|---|---|---|---|---|---|
| CVE-2026-42271 | BerriAI | litellm | CWE-77, CWE-78 | CVSS 4.0 base score 8.7 HIGH, scored by security-advisories@github.com (Secondary) | CVSS 3.1 base score 8.8 HIGH, scored by nvd@nist.gov (Primary) | 2026-05-08T04:16:21 | 2026-10-26T20:10:00 | Analyzed |
Technical background
The sources do not describe the product's general functionality or architecture. The NVD lists it as an affected component in several products, including Red Hat OpenShift AI [1].
Vulnerability description
The flaw allows unauthorized command execution on the proxy host through two test endpoints. The endpoints attempt to connect using the provided configuration, which spawns a subprocess with the proxy process's privileges [3]. The vulnerability is classified under the CWE-78 category, which involves improper neutralization of special elements in an OS command [3].
Root cause analysis
The sources do not provide a detailed root cause analysis beyond the CWE classification. The vulnerability is described as a command injection flaw, allowing authenticated users to execute arbitrary commands on the host [3].
Technical mechanics
The sources describe that the endpoints accept a full configuration including command execution parameters. The endpoints are protected by a valid proxy API key but lack role-based access control, enabling exploitation by authenticated users [3].
Attack surface and exploitation prerequisites
According to the CVSS vector, the vulnerability requires network access (AV:N) and low privileges (PR:L), with no user interaction needed (UI:N). The attack can be executed remotely without requiring user action [1].
Exploitation scenarios and attack lifecycle
The sources describe that authenticated users, including those with low-privilege internal-user keys, can exploit the flaw. The vendor page names the two affected endpoints, POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list [3].
Impact analysis
The CVSS 3.1 vector indicates high impact on confidentiality (C:H), integrity (I:H), and availability (A:H). The flaw enables arbitrary command execution on the host [1].
Affected products and versions
| Product | Affected Version | Fixed Version |
|---|---|---|
| litellm | >= 1.74.2, < 1.83.7 | 1.83.7 |
| redhat openshift ai | >= 2.25, < 2.25.8 | 2.25.8 |
| redhat openshift ai | >= 3.3, < 3.3.4 | 3.3.4 |
| redhat openshift ai | 3.4 | not listed |
Exploitation and threat intelligence status
CVE-2026-42271 is listed in CISA's Known Exploited Vulnerabilities catalog, with evidence of exploitation in the wild [2]. The EPSS score for this vulnerability is 0.9144 (91.44%) as of 2026-11-16 [5].
Indicators of compromise
The sources give no indicators of compromise.
Detection and exposure assessment
Check installed versions against the affected versions [1]. The SANS ISC diary reports scans that targeted both CVE-2026-42271 and CVE-2026-48710 alongside Starlette, whose versions before 1.0.1 do not validate the Host header [4].
Immediate mitigation
The vendor recommends applying the fix in version 1.83.7 [3]. Users who cannot upgrade immediately are advised to block the two test endpoints at their reverse proxy or API gateway [3].
Permanent remediation
The fixed version is 1.83.7, as listed in the NVD record [1]. The vendor advisory page confirms this as the fixed version [3].
Workarounds and compensating controls
The sources do not give any workarounds or compensating controls. General guidance includes patching Starlette to version 1.0.1 or later to fix the issue [4].
Validation and verification
Confirm the installed version after updating and ensure the fix is applied to all affected components.
Incident response
Review system logs for unusual command executions (general guidance, not from the reviewed sources).
Security hardening and prevention
General guidance includes reducing the attack surface; S4 says reducing attack surface is critical for mitigating the current surge in vulnerabilities [4].
Risk assessment
The CVSS 3.1 base score is 8.8 HIGH, scored by nvd@nist.gov (Primary) [1]. The EPSS score for this vulnerability is 0.9144 (91.44%) as of 2026-11-16 [5].
Conclusion
CVE-2026-42271 is a command injection vulnerability in BerriAI LiteLLM that allows authenticated users to execute arbitrary commands on the host. The fix is available in version 1.83.7. Defenders should apply the patch promptly and block the affected endpoints if an upgrade is not immediately possible.
Remediation checklist
- Apply the fix in version 1.83.7 [3].
- Block the two test endpoints at the reverse proxy or API gateway if an upgrade is not immediately possible [3].
- Patch Starlette to version 1.0.1 to address the related Host header issue reported alongside CVE-2026-42271 [4].
- Check installed versions against the affected versions [1].
- Review system logs for unusual command executions (general guidance, not from the reviewed sources).
- Isolating affected systems if exploitation is suspected is general guidance; the reviewed sources do not give it.
- Validate data components before assembling complex entities [4].
Evidence gaps
- The sources do not describe the product's general functionality or architecture.
- The sources do not provide a detailed root cause analysis beyond the CWE classification.
- The sources do not describe the complete version range of affected products.
- The sources do not give any indicators of compromise.
- The sources do not mention any detection signatures or workarounds beyond general guidance.
References
- CVE-2026-42271 record. NIST National Vulnerability Database (NVD), 2026-10-26. https://nvd.nist.gov/vuln/detail/CVE-2026-42271. Accessed 2026-11-18.
- Known Exploited Vulnerabilities Catalog: CVE-2026-42271. Cybersecurity and Infrastructure Security Agency (CISA), 2026-06-08. https://www.cisa.gov/known-exploited-vulnerabilities-catalog. Accessed 2026-11-18.
- Vendor advisory page (github.com). github.com. https://github.com/BerriAI/litellm/security/advisories/GHSA-v4p8-mg3p-g94g. Accessed 2026-11-18.
- Scans for LiteLLM/Starlette (CVE-2026-42271, CVE-2026-48710), (Mon, Nov 16th). SANS ISC, 2026-11-16. https://isc.sans.edu/diary/rss/33522. Accessed 2026-11-18.
- EPSS score for CVE-2026-42271. FIRST, 2026-11-16. https://api.first.org/data/v1/epss?cve=CVE-2026-42271. Accessed 2026-11-18.
Summary
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 breakdown
High · 8.7
An attacker with a normal user account can exploit this over the network, without any user action, but only under specific conditions.
- Attack from
- the network (remotely)
- Attack complexity
- low (no special conditions)
- Special conditions
- only in some setups or conditions
- Login needed
- yes, a normal user account
- User action needed
- no
- Impact
- high on confidentiality, integrity and availability
- Impact on other systems
- high on confidentiality, none on integrity and availability
Weakness
- CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
- CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected and fixed versions
| Product | Affected versions | Fixed in |
|---|---|---|
| BerriAI litellm | >= 1.74.2, < 1.83.7 | — |
CISA KEV
Exploited in the wild
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.
- Listed as
- BerriAI LiteLLM Command Injection Vulnerability
- Added to the catalog
- June 08, 2026
- Federal due date
- June 22, 2026
- 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.
- Ransomware use
- Not known
References by type
Patches and fixed releases
- github.com/BerriAI/litellm/security/advisories/GHSA-v4p8-mg3p-g94g
- github.com/BerriAI/litellm/releases/tag/v1.83.7-stable
Other references
Affected
- BerriAI litellm
- Red Hat OpenShift AI 2.25
- Red Hat OpenShift AI 3.3
- Red Hat OpenShift AI 3.4
- Red Hat Exploit Intelligence
Frequently asked questions
What is CVE-2026-42271?
CVE-2026-42271 affects BerriAI LiteLLM versions >= 1.74.2 and < 1.83.7, with CVSS 3.1 base score 8.8 HIGH, scored by nvd@nist.gov. The vulnerability allows authenticated users to execute arbitrary commands on the host, as confirmed by CISA. Immediate mitigation includes applying the fix in version 1.83.7. Weakness type: Improper Neutralization of Special Elements used in a Command ('Command Injection') (CWE-77).
How severe is CVE-2026-42271?
CVE-2026-42271 has a CVSS 4.0 base score of 8.7 (high), from the CNA (github.com). An attacker with a normal user account can exploit this over the network, without any user action, but only under specific conditions.
Is CVE-2026-42271 being exploited?
Yes. CISA lists CVE-2026-42271 in its Known Exploited Vulnerabilities (KEV) catalog, added June 8, 2026: it has been exploited in real attacks. US federal agencies must fix it by June 22, 2026.
Which versions are affected by CVE-2026-42271?
BerriAI litellm >= 1.74.2, < 1.83.7.
How do I fix CVE-2026-42271?
Apply the fix in version 1.83.7. Block the two test endpoints at the reverse proxy or API gateway if an upgrade is not immediately possible. Patch Starlette to version 1.0.1 to address the related Host header issue reported alongside CVE-2026-42271.
Timeline & sources
- NVD: CVE-2026-42271 — BerriAI litellm
- SANS ISC: Scans for LiteLLM/Starlette (CVE-2026-42271, CVE-2026-48710), (Mon, Nov 16th)
References
- NVD — CVE-2026-42271
- CVE.org record
- CISA Known Exploited Vulnerabilities catalog
- GitHub Advisory Database
Related vulnerabilities & news
- NetBird Client Daemon Exposes gRPC Interface Without Authentication
- Submariner PSK Flaw Enables MITM Attacks Through Shared Keys
- New ZQAgent Backdoor Gives Attackers Persistent Access to Linux Servers
- ZQAgent: AI-Driven Intrusion Tool Installs Persistent Backdoor on Linux Servers
- Shirudo: OpenAI and Cisco Release an eBPF-Based Linux Shield Tool for Unpatched Flaws