AI and data stack advisories

Severe, 6 weeks1496Projects326

1496 severe, 6 weeks · 326 projects

LiteLLMGHSA-46cm-pfwv-cgf8

LiteLLM has Server-Side Template Injection vulnerability in /completions endpoint

LiteLLM

CVE-2024-2952 · Published Apr 10, 2024 · updated Sep 10, 2026

Critical9.8
Fix: upgrade to 1.34.42 or later
GitHub advisory

BerriAI/litellm is vulnerable to Server-Side Template Injection (SSTI) via the /completions endpoint. The vulnerability arises from the hf_chat_template method processing the chat_template parameter from the tokenizer_config.json file through the Jinja template engine without proper sanitization. Attackers can exploit this by crafting malicious tokenizer_config.json files that execute arbitrary code on the server.

Affected versions

PackageAffectedFixed in
litellm
PyPI
< 1.34.421.34.42
Details and references

More LiteLLM advisories

All LiteLLM