litellm
Affected
- introduced
1.80.5, fixed1.83.7(ecosystem)
Fixed versions
1.83.7
Fix
- Fixed version
1.83.7pip install --upgrade litellm==1.83.7
Advisory
Also known as: CVE-2026-42203, PYSEC-2026-2602
LiteLLM: Server-Side Template Injection in /prompts/test endpoint
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:
POST /prompts/test at your reverse proxy or API gateway.High Basis: The source's own band: HIGH
1.80.5, fixed 1.83.7 (ecosystem)1.83.7
1.83.7pip install --upgrade litellm==1.83.7Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0