ZDI-26-1031: (0Day) LiteLLM MCP Command Injection Remote Code Execution Vulnerability
Summary
LiteLLM is affected by a command injection vulnerability leading to Remote Code Execution (RCE). Tracked under CVE-2026-42271 and ZDI-26-1031, this zero-day vulnerability carries a CVSS score of 7.2. Authentication with high privileges is required to exploit this flaw.
Affected Products
- LiteLLM (versions prior to v1.104.0)
Technical Details
The specific flaw exists within the handling of MCP stdio configurations. The issue results from the lack of proper validation of a user-supplied string before using it to execute a system call. An authenticated attacker can leverage this vulnerability to execute code in the context of the service account.
- CVE ID: CVE-2026-42271
- ZDI ID: ZDI-26-1031
- CVSS Score: 7.2 (AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H)
- Credit: David Fiser and Alfredo Oliveira of TrendAI Research
Impact
Successful exploitation allows remote authenticated attackers to execute arbitrary code on affected LiteLLM installations within the context of the service account.
Mitigation
The vendor recommends the following mitigations:
- Upgrade LiteLLM to version v1.104.0 or higher.
- From v1.104.0, stdio servers are disabled unless
LITELLM_ENABLE_MCP_STDIO=trueis set in the environment variables (not via API/config/DB); to stay safe, leave this unset. - Always replace any default/example master key with a strong random value; v1.104.0+ blocks application startup if unset, empty, or set to
sk-1234.
References
- ZDI Advisory: ZDI-26-1031
- CVE-2026-42271
Advisory ini disajikan tim ICT Cybersecurity PT Pertamina Bina Medika IHC sebagai informasi kesadaran keamanan. Verifikasi pada sumber resmi sebelum tindakan.