---
title: "CVE-2024-2952: LiteLLM has Server-Side Template Injection vulnerability in /completions endpoint"
url: https://erroneo.us/security/cve/CVE-2024-2952/
description: "CVE-2024-2952 (litellm (PyPI)): BerriAI/litellm is vulnerable to Server-Side Template Injection (SSTI) via the /completions endpoint. The vulnerability…"
type: vulnerability-record
section: "Security Digest"
date_published: 2024-04-10
date_modified: 2026-07-06
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2024-2952"
kev: false
cvss: 9.8
epss: 0.01267
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2024-2952: LiteLLM has Server-Side Template Injection vulnerability in /completions endpoint

**Signal:** Critical and remotely reachable. No known exploitation yet, but it is network-reachable without credentials. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- Not in CISA KEV , but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 1.3% , percentile 70: FIRST’s model estimates a 1.3% chance of exploitation activity in the next 30 days, higher than 70% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes litellm (PyPI) < 1.34.42, fixed in 1.34.42 . Check your lockfile, including transitive dependencies.

## What it is

BerriAI/litellm is vulnerable to Server-Side Template Injection (SSTI) via the /completions endpoint. The vulnerability arises from the hfchattemplate method processing the chattemplate parameter from the tokenizerconfig.json file through the Jinja template engine without proper sanitization. Attackers can exploit this by crafting malicious tokenizerconfig.json files that execute arbitrary code on the server.

## Affected packages

- PyPI `litellm` < 1.34.42 → fixed: 1.34.42

## Affected products (CVE record)

- berriai berriai/litellm: unspecified < 1.34.42

## Severity

- @huntr_ai CVSS 3.0: 9.8 `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub CVSS 3.1: 9.8 `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc , automatable yes , technical impact total .
- FIRST EPSS (model of 2026-10-21): 1.27% probability of exploitation activity in the next 30 days; percentile 70.

## Sources

- [GitHub Advisory GHSA-46cm-pfwv-cgf8](https://github.com/advisories/GHSA-46cm-pfwv-cgf8)
- [CVE.org record CVE-2024-2952](https://www.cve.org/CVERecord?id=CVE-2024-2952)
- [NVD entry CVE-2024-2952](https://nvd.nist.gov/vuln/detail/CVE-2024-2952)
- [huntr.com](https://huntr.com/bounties/a9e0a164-6de0-43a4-a640-0cbfb54220a4)
- [github.com](https://github.com/berriai/litellm/commit/8a1cdc901708b07b7ff4eca20f9cb0f1f0e8d0b3)
- [github.com](https://github.com/BerriAI/litellm/blob/0d803e13798db40aa7463e64a6bafaee386424f5/litellm/proxy/proxy_server.py#L2087)
- [github.com](https://github.com/BerriAI/litellm/issues/2949)
- [github.com](https://github.com/BerriAI/litellm/pull/2941)
- [github.com](https://github.com/BerriAI/litellm/commit/8a1cdc901708b07b7ff4eca20f9cb0f1f0e8d0b3)
- [github.com](https://github.com/BerriAI/litellm)
- [github.com](https://github.com/pypa/advisory-database/tree/main/vulns/litellm/PYSEC-2026-387.yaml)
- [pypi.org](https://pypi.org/project/litellm)

---
Source page: https://erroneo.us/security/cve/CVE-2024-2952/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
