{"id":"CVE-2026-42271","kind":"vulnerability","aliases":["CVE-2026-42271"],"related":[],"title":"LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format","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.","summary":"LiteLLM proxy's MCP test endpoints (POST /mcp-rest/test/connection and /mcp-rest/test/tools/list) accept a stdio server config and spawn its command on the proxy host. They only need a valid proxy API key, with no role check, so any low-privilege key holder gets arbitrary command execution. Exploited in the wild and a Metasploit module is public. CSA reports it chains with a Starlette Host-header auth bypass for unauthenticated RCE.","severity":"critical","cvss":8.8,"epss":null,"exploited":true,"exploited_at":"2026-06-08T00:00:00+00:00","products":[{"name":"BerriAI LiteLLM","fixed":[],"affected":"","ecosystem":"vendor"},{"name":"litellm","fixed":["1.83.7"],"affected":">= 1.74.2, < 1.83.7","ecosystem":"pypi"},{"name":"litellm","fixed":["1.83.7"],"affected":">= 1.74.2, < 1.83.7","ecosystem":"vendor"},{"name":"redhat openshift ai","fixed":["2.25.8"],"affected":">= 2.25, < 2.25.8","ecosystem":"vendor"},{"name":"redhat openshift ai","fixed":["3.3.4"],"affected":">= 3.3, < 3.3.4","ecosystem":"vendor"},{"name":"redhat openshift ai","fixed":[],"affected":"= 3.4","ecosystem":"vendor"}],"ecosystems":["pypi","vendor"],"tags":["ai-tooling","exploited","litellm","llm-gateway","mcp","poc-public","python","self-hosted"],"not_affected_if":["managed-hosting"],"how_to_check":"Run 'pip show litellm' (or check the container image tag). Versions >= 1.74.2 and < 1.83.7 are vulnerable. Check proxy access logs for POST /mcp-rest/test/connection or /mcp-rest/test/tools/list from non-admin keys, especially bodies with transport stdio and a command like bash or sh. Check for unexpected child processes of the proxy. Snort rule 1:66993 detects bash attempts. If these were reachable, treat the host as compromised and rotate the provider keys and the master key stored on it.","fix":"Upgrade litellm to 1.83.7 or later. Both endpoints then require PROXY_ADMIN (non-admin keys get 403), and the stdio command is limited to an allowlist (deno, docker, node, npx, python, python3, uvx). CSA also advises Starlette 1.0.1 or later for the Host-header chain. Until you upgrade, block /mcp-rest/test/* at the reverse proxy and do not expose the proxy to untrusted networks.","status":"resolved","published_at":"2026-05-08T04:16:21+00:00","first_seen_at":"2026-10-23T19:11:51+00:00","triaged_at":"2026-10-23T20:33:57+00:00","updated_at":"2026-10-23T23:44:51+00:00","category":"ai-tooling","confidence":0.9,"triage":{"at":"2026-10-23T20:33:57Z","model":"claude-haiku-5-5","output":{"fix":"Apply the vendor mitigation per BerriAI guidance; the affected and fixed versions are not stated in the sources. If no mitigation is available, discontinue use of the product per CISA.","summary":"LiteLLM, an LLM gateway and proxy, has a command injection flaw that lets any authenticated user, including holders of low-privilege internal-user keys, run arbitrary commands on the host. CISA lists it as actively exploited in the wild.","category":"ai-tooling","who_cares":["litellm","self-hosted","llm-gateway","python"],"confidence":0.7,"analyst_note":"Find the affected and fixed LiteLLM versions and a detection method (e.g. version check, logs) from the BerriAI advisory for CVE-2026-42271, linked from the CISA KEV entry.","how_to_check":"unknown","needs_analyst":true,"not_affected_if":["managed-hosting"],"severity_if_unknown":"critical"},"cost_usd":0.000372,"input_tokens":2077,"output_tokens":329,"severity_before":"unknown"},"analyst_status":"done","analyst_note":"Find the affected and fixed LiteLLM versions and a detection method (e.g. version check, logs) from the BerriAI advisory for CVE-2026-42271, linked from the CISA KEV entry.","search":"'-2026':18A,21A '-42271':19A,22A '/mcp-rest/test/connection':59B,158C '/mcp-rest/test/tools/list':61B,161C '1.74.2':141C '1.83.7':145C,256C 'accept':62B,162C 'ai':6A,29A,32A,35A,37B,128C 'ai-tool':36B 'api':11A,81B,133C,222C 'arbitrari':95B,244C 'arg':174C 'attempt':191C 'auth':118B 'authent':229C 'berriai':23A 'bodi':170C 'bypass':119B 'call':9A,131C,184C 'chain':111B 'check':86B,227C 'command':70B,96B,173C,198C,245C 'config':66B 'configur':166C,188C 'connect':193C 'could':241C 'csa':108B 'cve':17A,20A 'endpoint':57B,147C,190C,214C 'env':176C 'execut':97B 'exploit':39B,98B 'field':177C 'format':16A,138C 'full':164C 'gate':216C 'gateway':7A,43B,129C 'get':94B 'header':117B 'holder':93B,232C 'host':51B,74B,116B,205C,248C 'host-head':115B 'includ':171C,231C 'intern':238C 'internal-us':237C 'issu':250C 'key':82B,92B,223C,240C 'litellm':1A,24A,25A,26A,40B,52B,123C 'llm':10A,42B,132C 'llm-gateway':41B 'low':90B,235C 'low-privileg':89B,234C 'mcp':44B,55B,152C 'metasploit':104B 'modul':105B 'nativ':15A,137C 'need':77B 'openai':13A,135C 'openshift':28A,31A,34A 'patch':253C 'poc':46B 'poc-publ':45B 'post':58B,157C,160C 'preview':150C 'privileg':91B,208C,236C 'process':212C 'proxi':4A,53B,73B,80B,126C,204C,211C,221C 'public':47B,107B 'python':48B 'rce':122B 'redhat':27A,30A,33A 'report':109B 'request':169C 'role':85B,226C 'run':243C 'save':155C 'self':50B 'self-host':49B 'server':5A,65B,127C,153C,165C 'spawn':68B,195C 'starlett':114B 'stdio':64B,181C,187C 'subprocess':201C 'suppli':197C 'test':56B 'therefor':242C 'tool':38B 'transport':182C 'two':146C 'unauthent':121B 'use':148C,178C 'user':230C,239C 'valid':79B,220C 'version':140C,144C,255C 'wild':101B","nicknames":[],"mitigations":[],"who_affected":null,"tier":null,"verified":{},"analyst_revisit_at":null,"first_public_at":"2026-05-08T04:16:21+00:00","kev":{"dateAdded":"2026-06-08","dueDate":"2026-06-22","requiredAction":"Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.","knownRansomwareCampaignUse":"Unknown"},"cvss_vector":"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","cvss_by":"security-advisories@github.com","poc_count":1,"sources":[{"source":"kev","external_id":"CVE-2026-42271","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?search_api_fulltext=CVE-2026-42271","severity":null,"published_at":"2026-06-08T00:00:00+00:00","modified_at":null,"first_seen_at":"2026-10-23T19:11:51+00:00","fetched_at":"2026-10-25T20:35:31+00:00","note":null},{"source":"analyst","external_id":"CVE-2026-42271:20","url":null,"severity":null,"published_at":"2026-10-23T20:37:06+00:00","modified_at":"2026-10-23T20:37:06+00:00","first_seen_at":"2026-10-23T20:37:06+00:00","fetched_at":"2026-10-23T20:37:06+00:00","note":"GitHub advisory GHSA-v4p8-mg3p-g94g: LiteLLM 1.74.2 to 1.83.6 affected, fixed in 1.83.7. Exploited (CISA KEV 2026-06-08), Metasploit module public. Severity kept critical because of KEV exploitation and the PoC (CNA rates it 8.7 high). CSA reports a chain with a Starlette Host-header bypass (CVE-2026-48710) that gives unauthenticated RCE, from one secondary source I did not verify."},{"source":"nvd","external_id":"CVE-2026-42271","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42271","severity":null,"published_at":"2026-05-08T04:16:21+00:00","modified_at":"2026-07-15T02:21:30+00:00","first_seen_at":"2026-10-23T23:44:51+00:00","fetched_at":"2026-10-23T23:44:51+00:00","note":null}],"documents":[{"id":849,"url":"https://github.com/advisories/GHSA-V4P8-MG3P-G94G","title":"GHSA-v4p8-mg3p-g94g LiteLLM MCP stdio test endpoints","kind":"advisory","source":"analyst","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":null},{"id":850,"url":"https://www.rapid7.com/db/modules/exploit/multi/http/litellm_mcp_test_cmd_injection/","title":"Metasploit module litellm_mcp_test_cmd_injection","kind":"poc","source":"analyst","text":null,"published_at":null,"relation":"poc","confidence":null,"note":null},{"id":851,"url":"https://labs.cloudsecurityalliance.org/research/csa-research-note-litellm-cve-2026-42271-ai-gateway-exploita/","title":"CSA research note: LiteLLM CVE-2026-42271 exploitation","kind":"blog","source":"analyst","text":null,"published_at":null,"relation":"discussion","confidence":null,"note":null},{"id":852,"url":"https://snort.org/rule_docs/1-66993","title":"Snort rule 1:66993 LiteLLM command injection","kind":"other","source":"analyst","text":null,"published_at":null,"relation":"mitigation","confidence":null,"note":null},{"id":1191,"url":"https://horizon3.ai/attack-research/vulnerabilities/cve-2026-42271-chained-with-cve-2026-48710/","title":"Horizon3: LiteLLM unauth RCE chaining CVE-2026-42271 + CVE-2026-48710","kind":"blog","source":"analyst","text":null,"published_at":null,"relation":"mentions","confidence":null,"note":null}],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}