ADVISORIES

PyPA Advisory Database

PYSEC-2026-3861

LiteLLM vulnerable to server-side template injection in the /prompts/test endpoint

Details

BerriAI litellm <=1.82.4 is vulnerable to Server-Side Template Injection (SSTI), which allows unauthenticated remote attackers to execute arbitrary OS commands via a crafted dotprompt_content parameter in the /prompts/test endpoint due to use of an unsandboxed jinja2.Environment.

Affected packages

EcosystemPackageAffected versions
PyPIlitellm
All versions before 1.83.7 (fixed in 1.83.7)

References