CVE-2026-42203 LiteLLM: Server-Side Template Injection in /prompts/test endpoint

High 8.6 Published Updated

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.

Weakness: CWE-94, CWE-1336

Which versions are affected by CVE-2026-42203?

3 open source packages ship an affected version, including litellm. It affects 1 product.

PackageAffectedFixed in
litellm PyPIFrom 1.80.51.83.7
litellm PyPIFrom 1.80.51.83.7
litellm PyPIFrom 1.80.51.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.

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.

Is CVE-2026-42203 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free