CVE-2024-2952

Server-Side Template Injection in BerriAI/litellm

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.

Category

9.8
CVSS
Severity: Critical
CVSS 3.0 •
EPSS 0.83% Top 30%
Affected: berriai berriai/litellm
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2024-2952?
CVE-2024-2952 has been scored as a critical severity vulnerability.
How to fix CVE-2024-2952?
To fix CVE-2024-2952, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2024-2952 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2024-2952 is being actively exploited. According to its EPSS score, there is a ~1% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2024-2952?
CVE-2024-2952 affects berriai berriai/litellm.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.