Server-Side Template Injection (SSTI) Vulnerability in BerriAI/litellm
CVE-2024-2952
9.8CRITICAL
What is CVE-2024-2952?
BerriAI's Litellm product is compromised by a vulnerability allowing Server-Side Template Injection (SSTI) through the /completions endpoint. The issue stems from the hf_chat_template
method inadequately processing the chat_template
parameter originating from the tokenizer_config.json
file. This lack of proper sanitization enables attackers to craft malicious tokenizer_config.json
files that can execute arbitrary code on the server. Without stringent checks and validation, the exploitation poses significant security risks, allowing for unauthorized commands to be run with the privileges of the server.
Affected Version(s)
berriai/litellm < 1.34.42