CVE-2024-2952
LiteLLM has Server-Side Template Injection vulnerability in /completions endpoint
9.8
CRITICAL
CVSS 3.1
EPSS 1.4%
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.
How to fix CVE-2024-2952
To remediate CVE-2024-2952, upgrade the affected package to a fixed version below.
- —upgrade to 1.34.42 or later
Is CVE-2024-2952 being exploited?
Low — EPSS is 1.4%, meaning exploitation activity has not been observed at scale.
Affected packages (1)
- from 0, < 1.34.42
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | CRITICAL9.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |