CVE-2026-42271
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
litellmPyPI | >= 1.74.2, < 1.83.7 | 1.83.7 |
Affected products
5- osv-coords4 versions
< 3.2.2-r7+ 3 more
- (no CPE)range: < 3.2.2-r7
- (no CPE)range: < 1.83.10.0-r0
- (no CPE)range: < 3.2.2-r7
- (no CPE)range: >= 1.74.2, < 1.83.7
Patches
Vulnerability mechanics
References
5- github.com/BerriAI/litellm/security/advisories/GHSA-v4p8-mg3p-g94gnvdMitigationPatchVendor AdvisoryWEB
- github.com/advisories/GHSA-v4p8-mg3p-g94gghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-42271ghsaADVISORY
- github.com/BerriAI/litellm/releases/tag/v1.83.7-stablenvdProductRelease NotesWEB
- www.cisa.gov/known-exploited-vulnerabilities-catalognvdUS Government ResourceWEB
News mentions
7- LiteLLM Vulnerability Chain Lets Low-Privilege Users Take Over AI Gateway ServersThe Hacker News · Jun 15, 2026
- Week in review: Exploited Check Point VPN zero-day, Oracle PeopleSoft servers under attackHelp Net Security · Jun 14, 2026
- In Other News: Google Security Layoffs, AudiA6 Takedown, $400 Million Coupang FineSecurityWeek · Jun 12, 2026
- LiteLLM vulnerability under active attack, CISA warns (CVE-2026-42271)Help Net Security · Jun 9, 2026
- Hackers Exploiting LiteLLM RCE Vulnerability in the Wild to Run Arbitrary CommandsCyber Security News · Jun 9, 2026
- LiteLLM Flaw CVE-2026-42271 Exploited in the Wild, Chains to Unauthenticated RCEThe Hacker News · Jun 9, 2026
- CISA Adds Two Known Exploited Vulnerabilities to CatalogCISA Alerts