Critical severity · published Apr 10, 2024
CVE-2024-2952
BerriAI/litellm is vulnerable to Server-Side Template Injection (SSTI) via the `/completions` endpoint
9.8
CVSS
1.3%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)1.3% · higher than 70% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
LI
Litellm · Litellm
before 1.34.42 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-2952
CVE.org
https://www.cve.org/CVERecord?id=CVE-2024-2952
Patch
https://github.com/berriai/litellm/commit/8a1cdc901708b07b7ff4eca20f9cb0f1f0e8d0b3
Exploit
https://huntr.com/bounties/a9e0a164-6de0-43a4-a640-0cbfb54220a4
More from Litellm
9.8
CVE-2026-42208
LiteLLM: SQL injection in Proxy API key verification
8.8
CVE-2026-42271
LiteLLM: Authenticated command execution via MCP stdio test endpoints
8.8
CVE-2026-33634
Trivy ecosystem supply chain briefly compromised
8.2
CVE-2026-59822
LiteLLM: MCP Authentication Bypass via OAuth2 Passthrough Fallback
9.8
CVE-2026-49468
LiteLLM: Authentication Bypass via Host Header Injection
