Description
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.
References (2)
Core 2
Core References
Exploit, Third Party Advisory
https://huntr.com/bounties/a9e0a164-6de0-43a4-a640-0cbfb54220a4
Scores
CVSS v3
9.8
EPSS
0.0143
EPSS Percentile
80.8%
Attack Vector
NETWORK
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CISA SSVC
Vulnrichment
Exploitation
poc
Automatable
yes
Technical Impact
total
Details
CWE
CWE-76
Status
published
Products (2)
litellm/litellm
< 1.34.42
pypi/litellm
0 - 1.34.42PyPI
Published
Apr 10, 2024
Tracked Since
Feb 18, 2026