// For flags

CVE-2024-2952

Server-Side Template Injection in BerriAI/litellm

Severity Score

9.8
*CVSS v3

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Attend
*SSVC
Descriptions

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.

BerriAI/litellm es vulnerable a Server-Side Template Injection (SSTI) a través del endpoint `/completions`. La vulnerabilidad surge del método `hf_chat_template` que procesa el parámetro `chat_template` del archivo `tokenizer_config.json` a través del motor de plantillas Jinja sin una sanitización adecuada. Los atacantes pueden aprovechar esto creando archivos maliciosos `tokenizer_config.json` que ejecutan código arbitrario en el servidor.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Network
Attack Complexity
Low
Authentication
None
Confidentiality
Partial
Integrity
Partial
Availability
Partial
* Common Vulnerability Scoring System
SSVC
  • Decision:Attend
Exploitation
Poc
Automatable
Yes
Tech. Impact
Total
* Organization's Worst-case Scenario
Timeline
  • 2024-03-26 CVE Reserved
  • 2024-04-10 CVE Published
  • 2024-08-01 CVE Updated
  • 2025-07-04 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-76: Improper Neutralization of Equivalent Special Elements
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Berriai
Search vendor "Berriai"
Litellm
Search vendor "Berriai" for product "Litellm"
*-
Affected