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.
Metrics
Affected Vendors & Products
Advisories
Source | ID | Title |
---|---|---|
![]() |
EUVD-2024-1088 | 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. |
![]() |
GHSA-46cm-pfwv-cgf8 | LiteLLM has Server-Side Template Injection vulnerability in /completions endpoint |
Fixes
Solution
No solution given by the vendor.
Workaround
No workaround given by the vendor.
References
History
Tue, 15 Jul 2025 14:30:00 +0000
Type | Values Removed | Values Added |
---|---|---|
First Time appeared |
Litellm
Litellm litellm |
|
CPEs | cpe:2.3:a:litellm:litellm:*:*:*:*:*:*:*:* | |
Vendors & Products |
Litellm
Litellm litellm |

Status: PUBLISHED
Assigner: @huntr_ai
Published:
Updated: 2024-08-01T19:32:42.587Z
Reserved: 2024-03-26T18:00:46.844Z
Link: CVE-2024-2952

Updated: 2024-08-01T19:32:42.587Z

Status : Analyzed
Published: 2024-04-10T17:15:54.823
Modified: 2025-07-15T14:21:14.340
Link: CVE-2024-2952

No data.

Updated: 2025-07-12T16:01:34Z