LiteLLM: Authenticated command execution via MCP stdio test endpoints
Title source: cnaExploitation Summary
CVE-2026-42271 is actively exploited and listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, added June 8, 2026. EIP tracks 4 public exploits from researchers including SecureWithUmer, amnsecurity, HORKimhab. A Nuclei detection template is also available.
AI-analyzed exploit summary This repository contains no functional exploit code, technical details, or vulnerability analysis for CVE-2026-42271. It only includes placeholder files (README, LICENSE, .gitignore, and a template file) with generic educational disclaimers and setup instructions.
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.
Exploits (4)
This repository contains no functional exploit code, technical details, or vulnerability analysis for CVE-2026-42271. It only includes placeholder files (README, LICENSE, .gitignore, and a template file) with generic educational disclaimers and setup instructions.
This repository contains a functional exploit for CVE-2026-42271, a command injection vulnerability in LiteLLM AI Gateway's MCP test endpoints. The exploit leverages unsanitized 'command', 'args', and 'env' fields in user-controlled server configurations to execute arbitrary OS commands on the host.
The repository contains only a template structure with no actual exploit code or technical details about CVE-2026-42271. It includes placeholder files and a generic README with legal disclaimers but no functional PoC.
This repository contains a functional exploit for CVE-2026-42271, targeting LiteLLM's MCP stdio command injection vulnerability. The exploit leverages the POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list endpoints to execute arbitrary commands on a vulnerable LiteLLM instance.
Nuclei Templates (1)
References (9)
Scores
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H