CVE-2026-42203 LiteLLM: Server-Side Template Injection in /prompts/test endpoint
Authenticated users can execute arbitrary code via Server-Side Template Injection in the LiteLLM proxy, potentially exposing secrets and compromising the host.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-42203?
CVE-2026-42203 is a high-severity code injection vulnerability in BerriAI litellm, published on 8 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format. From version 1.80.5 to before version 1.83.7, the POST /prompts/test endpoint accepted user-supplied prompt templates and rendered them without sandboxing. A crafted template could run arbitrary code inside the LiteLLM Proxy process. The endpoint only checks that the caller presents a valid proxy API key, so any authenticated user could reach it. Depending on how the proxy is deployed, this could expose secrets in the process environment (such as provider API keys or database credentials) and allow commands to be run on the host. This issue has been patched in version 1.83.7.
Which versions are affected by CVE-2026-42203?
3 open source packages ship an affected version, including litellm. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
litellm PyPI | From 1.80.5 | 1.83.7 |
litellm PyPI | From 1.80.5 | 1.83.7 |
litellm PyPI | From 1.80.5 | 1.83.7 |
Products include Litellm Litellm.
How do I fix CVE-2026-42203?
Upgrade litellm to 1.83.7 or later.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-42203 being exploited?
There is no known exploitation of CVE-2026-42203 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in BerriAI litellm
Sources
Also known as CLEANSTART-2026-OY83568, ECHO-cec0-f797-4e78, GHSA-xqmj-j6mv-4862, MINI-6rvq-x8xq-rm8p, MINI-f939-hjqj-rhv7, MINI-ggq5-3hr9-pxr8 and 4 more.