CVE-2024-2952: Server-Side Template Injection in BerriAI/litellm
BerriAI/litellm is vulnerable to Server-Side Template Injection (SSTI) via the /completions endpoint. The vulnerability arises from the hfchattemplate method processing the chattemplate parameter from the tokenizerconfig.json file through the Jinja template engine without proper sanitization. Attackers can exploit this by crafting malicious tokenizerconfig.json files that execute arbitrary code on the server.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-2952?
CVE-2024-2952 has a high severity rating due to the potential for Server-Side Template Injection, which can lead to remote code execution.
How do I fix CVE-2024-2952?
To fix CVE-2024-2952, update litellm to version 1.34.42 or later.
What is Server-Side Template Injection as described in CVE-2024-2952?
Server-Side Template Injection allows an attacker to execute arbitrary template code on the server by injecting malicious content via user input.
What impact does CVE-2024-2952 have on my application?
Exploitation of CVE-2024-2952 could allow attackers to execute arbitrary code on the server, potentially compromising the entire system.
Which versions of litellm are affected by CVE-2024-2952?
CVE-2024-2952 affects versions of litellm prior to 1.34.42.