CVE-2024-2952
CVE-2024-2952 is a critical-severity vulnerability in Litellm with a CVSS 3.x base score of 9.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-76.
Key facts
- Severity: Critical (CVSS 3.x base score 9.8)
- EPSS exploit prediction: 1% (66th percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2024-1088
- Weakness: CWE-76
- Affected product: Litellm
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2024-2952?
- 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.
- How severe is CVE-2024-2952?
- CVE-2024-2952 has a CVSS 3.x base score of 9.8, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2024-2952 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (66th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2024-2952?
- CVE-2024-2952 affects Litellm. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2024-2952?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
- Does CVE-2024-2952 have an EU (EUVD) identifier?
- Yes. CVE-2024-2952 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2024-1088.
- When was CVE-2024-2952 published?
- CVE-2024-2952 was published on 2024-04-10 and last updated on 2026-06-17.
References
- https://github.com/berriai/litellm/commit/8a1cdc901708b07b7ff4eca20f9cb0f1f0e8d0b3
- https://huntr.com/bounties/a9e0a164-6de0-43a4-a640-0cbfb54220a4
Affected products (1)
- cpe:2.3:a:litellm:litellm:*:*:*:*:*:*:*:*
More vulnerabilities in Litellm
- CVE-2026-49468 — Critical (CVSS 9.8): LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format. Prior to 1.84.0, This…
- CVE-2026-42208 — Critical (CVSS 9.8): LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format. From version 1.81.16 to before…
- CVE-2024-5751 — Critical (CVSS 9.8): BerriAI/litellm version v1.35.8 contains a vulnerability where an attacker can achieve remote code execution. The…
- CVE-2026-35030 — Critical (CVSS 9.1): LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format. Prior to 1.83.0, when JWT…
- CVE-2026-47102 — High (CVSS 8.8): LiteLLM prior to 1.83.10 allows a user to modify their own user_role via the /user/update endpoint. While the endpoint…
- CVE-2026-47101 — High (CVSS 8.8): LiteLLM prior to 1.83.14 allows an authenticated internal_user to create API keys with access to routes that their role…
Other CWE-76 vulnerabilities
- CVE-2024-34359 — Critical (CVSS 9.6): llama-cpp-python is the Python bindings for llama.cpp. `llama-cpp-python` depends on class `Llama` in `llama.py` to…
- CVE-2024-4897 — High (CVSS 8.4): parisneo/lollms-webui, in its latest version, is vulnerable to remote code execution due to an insecure dependency on…
- CVE-2024-1882 — High (CVSS 7.2): This vulnerability allows an already authenticated admin user to create a malicious payload that could be leveraged for…
- CVE-2024-21600 — Medium (CVSS 6.5): An Improper Neutralization of Equivalent Special Elements vulnerability in the Packet Forwarding Engine (PFE) of…
- CVE-2023-1149 — Medium (CVSS 5.4): Improper Neutralization of Equivalent Special Elements in GitHub repository btcpayserver/btcpayserver prior to 1.8.0.
- CVE-2024-1221 — Low (CVSS 3.1): This vulnerability potentially allows files on a PaperCut NG/MF server to be exposed using a specifically formed…