INCIDENT MAP

Browse / AI Framework and Platform Flaws / CVE-2026-42203

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

CVE-2026-42203 ยท 2026-04-24 high

Class
AI Framework and Platform Flaws (filed by a model that read the advisory)
Technique
Code and command execution
Affected
litellm (PyPI)
CVSS
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
EPSS
0.4% chance of exploitation in 30 days

How it works, in short

A user-supplied prompt template is rendered without a sandbox, so crafted template expressions can execute code inside the proxy process. (Our summary, written by a model. The source text is below.)

Details

Impact

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.

Proxy deployments running an affected version are in scope.

Patches

The issue is fixed in 1.83.7-stable. The fix switches the prompt template renderer to a sandboxed environment that blocks the attributes this attack relies on.

LiteLLM recommends upgrading to 1.83.7-stable or later.

Workarounds

If upgrading is not immediately possible:

References

Source: GitHub Advisory Database, used under CC BY 4.0.