CVE-2024-2952: berriai berriai/litellm
Vulnerability summary
CVE-2024-2952 is a critical (CVSS 9.8) vulnerability in berriai berriai/litellm. EPSS estimates a 1.27% chance of exploitation in the next 30 days, higher than 69.3% of scored vulnerabilities. 1 public exploit is recorded.
Timeline
- 10-04-2024PublishedVulnerability first disclosed.
- 01-08-2024Last modifiedVulnerability information updated.
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 metrics
3 scores · 3 sources · 1 version- OSV · PypiEcosystem advisory · calculated9.8CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- NVDNIST9.8CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
1.27%
Chance of exploitation in the next 30 days
Percentile
69%
Versus all other CVEs
30-day change
0.00 pp
From 1.27% on 20-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundExploit Reference (huntr.com)
Maturity: unknown
Weaknesses
CWE · root causeAffected systems
Berriai1 product
- berriai/litellm≥ unspecified, < 1.34.42
Litellm1 product
- litellm< 1.34.42
PyPI1 product
- litellm< 1.34.42
3 vendors · 3 products
References
11 links- github.com/BerriAI/litellmPACKAGE