CVE-2024-2952

Server-Side Template Injection in BerriAI/litellm

Published Apr 10, 2024 CVSS 3.0 · 9.8 Critical EPSS 1.3% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2024-1088 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.
Github GHSA Github GHSA GHSA-46cm-pfwv-cgf8 LiteLLM has Server-Side Template Injection vulnerability in /completions endpoint
History
Type Values Removed Values Added
First Time appeared Litellm
Litellm litellm
CPEs cpe:2.3:a:litellm:litellm:*:*:*:*:*:*:*:*
Vendors & Products Litellm
Litellm litellm
Weaknesses

Sources

Status
PUBLISHED
Assigner
@huntr_ai
Published
Updated
Aug 1, 2024, 7:32 PM
Reserved
Mar 26, 2024, 6:00 PM
Status
Analyzed
Published
Apr 10, 2024, 5:15 PM
Modified
Jun 17, 2026, 7:25 AM