PT-2024-22934 · Unknown+1 · Berriai/Litellm+1

·

CVE-2024-2952

·

Published

2024-04-10

·

Updated

2026-06-29

CVSS v3.1

9.8

Critical

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions BerriAI/litellm (affected versions not specified)
Description The issue 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, allowing Server-Side Template Injection (SSTI) via the "/completions" endpoint. Attackers can exploit this by crafting malicious tokenizer config.json files that execute arbitrary code on the server.
Recommendations As a temporary workaround, consider disabling the hf chat template method until a patch is available. Restrict access to the "/completions" endpoint to minimize the risk of exploitation. Avoid using the chat template parameter in the affected API endpoint until the issue is resolved. At the moment, there is no information about a newer version that contains a fix for this vulnerability.

Exploit

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2024-2952
GHSA-46CM-PFWV-CGF8
PYSEC-2026-387

Affected Products

Berriai/Litellm
Jinja