CVE-2024-2952

published 10 Apr 2024 · updated 1 Aug 2024

Server-Side Template Injection in BerriAI/litellm

9.8CriticalCVSS 9.8EPSS 1%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 1%. Fixed in berriai/litellm 1.34.42.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
BerriAIberriai/litellm<1.34.421.34.42

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in BerriAI, strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2024-2952 severity on Zeptric[![CVE-2024-2952](https://zeptric.io/badge/cve/CVE-2024-2952.svg)](https://zeptric.io/cve/CVE-2024-2952)