---
cve: "CVE-2024-2952"
severity: "CRITICAL"
cvss: 9.8
epss: "1.3%"
vendor: "berriai"
kev: false
exploited: false
published: "2024-04-10 17:07:52"
tags: [cve, security, critical]
source: tsecurity.de CVE-Dossier
exported: "2026-09-03T21:52:20+02:00"
---

# CVE-2024-2952

> 9.8 CRITICAL · 🧪 PoC

## Beschreibung

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-Vektor

```
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
```

| Metrik | Wert | Bewertung |
|---|---|---|
| AV Angriffsvektor | Netzwerk | bad |
| AC Komplexität | Gering | bad |
| PR Privilegien | Keine | bad |
| UI Interaktion | Keine | bad |
| S Scope | Unverändert | good |
| C Vertraulichkeit | Hoch | bad |
| I Integrität | Hoch | bad |
| A Verfügbarkeit | Hoch | bad |

## Patch verfügbar (OSV)

- a4d7ef967e4f70e03fd735ab430438f24c617bc2 (Commit)
- 8a1cdc901708b07b7ff4eca20f9cb0f1f0e8d0b3 (Commit)

## Referenzen

- <https://huntr.com/bounties/a9e0a164-6de0-43a4-a640-0cbfb54220a4>
- <https://github.com/berriai/litellm/commit/8a1cdc901708b07b7ff4eca20f9cb0f1f0e8d0b3>

---
_Exportiert aus dem [tsecurity.de CVE-Dossier](https://tsecurity.de/cve?cve=CVE-2024-2952) · Datenquellen: EUVD (ENISA), NVD, OSV, CISA KEV, FIRST EPSS, Exploit-DB, BSI BITS_
