CVE-2026-42271LiteLLM: Authenticated command execution via MCP stdio test endpoints
- 8.7HighCVSS base score
- 91.4%Exploitation in 30 daysEPSS · top 0.2% of all CVEs
- YesKnown exploitedin CISA's KEV since 8 Jun 2026
- 2Public exploitsMetasploit, Nuclei and Exploit-DB
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.
Exploited in the wild
CISA lists this vulnerability in its Known Exploited Vulnerabilities catalog as BerriAI LiteLLM Command Injection Vulnerability.
- Added
- 8 Jun 2026
- Fix due (US federal)
- 22 Jun 2026
- Used by ransomware
- Not known
Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
ENISA's EU Vulnerability Database lists it as exploited, from CISA's KEV, since 8 Jun 2026.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. The public collections list a Metasploit module and a Nuclei template for it. CISA's SSVC rates its exploitation: it is being exploited.
Show the exploits2
Metasploit modules1 module
- BerriAI LiteLLM Proxy MCP Test Endpoint Command Execution (Metasploit module) (opens in a new tab)
exploit/multi/http/litellm_mcp_test_cmd_injectionRank excellentdisclosed 21 Apr 2026
Nuclei templates1 template
- LiteLLM - Command Injection (Nuclei template) (opens in a new tab)
http/cves/2026/CVE-2026-42271.yamlSeverity critical
Modules, templates and exploits as listed by the Metasploit Framework (BSD-3-Clause), ProjectDiscovery's Nuclei templates (MIT) and the Exploit Database (GPLv2), read once a day. Where the data comes from
Timeline
ID reserved
By GitHub_M
- 12 days later
· 12 days later
Published
- 31 days later
· 31 days later
Added to CISA KEV
Known exploited in the wild
- 37 days later
· 37 days later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 4.0 | High8.7 | 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 |
| redhat-SADPADP (enrichment) | 3.1 | High8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVDNVD · Analyzed | 4.0 | High8.7 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
- EPSS (exploitation in 30 days)
- 91.4% · top 0.2% of all CVEs (14 Nov 2026)
- CISA SSVC
- Exploitation: active · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.7.
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- PyPIlitellmGHSA-v4p8-mg3p-g94g (opens in a new tab)
References
References9
- https://github.com/BerriAI/litellm/security/advisories/GHSA-v4p8-mg3p-g94g (opens in a new tab)x_refsource_CONFIRM
- https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable (opens in a new tab)x_refsource_MISC
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-42271 (opens in a new tab)government-resource
- https://access.redhat.com/security/cve/CVE-2026-42271 (opens in a new tab)vdb-entryx_refsource_REDHAT
- RHBZ#2467924 (opens in a new tab)issue-trackingx_refsource_REDHAT
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42271.json (opens in a new tab)x_sadp-csaf-vex
- https://access.redhat.com/errata/RHSA-2026:28960 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:30056 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:27784 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- CISA KEV catalog (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2026-28507 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-v4p8-mg3p-g94g (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2026-42271)Record last updated .