LiteLLM <= 1.82.4 - Server-Side Template Injection to RCE
LiteLLM proxy through 1.82.4 renders the user-supplied dotprompt_content of the POST /prompts/test endpoint with an unsandboxed jinja2 Environment. On a proxy started without a master key the endpoint is reachable unauthenticated, so a remote attacker can inject a jinja2 template that reaches os.popen through the template globals and execute arbitrary OS commands as the proxy user. Rendering happens before the downstream LLM call, so execution does not depend on a working model.