Skip to content
Fencer Intel
critical 9.8

CVE-2024-2952 json

Server-Side Template Injection in BerriAI/litellm

published 2y ago modified 2mo ago also GHSA-46cm-pfwv-cgf8 , PYSEC-2026-387 , EUVD-2024-1088

cvss
9.8
version 3.0, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.3%
EPSS 1.3% chance of exploitation in 30 days, percentile 70%
public exploits
0
none known

Summary

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.

Patch / fix

  • pypi litellm 1.34.42
  • berriai berriai/litellm 1.34.42
  • berriai litellm 1.34.42

Is CVE-2024-2952 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

CISA SSVC

Exploitation
Proof of concept is public
Automatable
yes
Technical impact
total
Assessed
2y ago

Exploit prediction

1.27% chance of exploitation in the next 30 days, higher than 70% of all scored CVEs (FIRST EPSS, 2026-11-11).

Exploits and checks

  • huntr.com https://huntr.com/bounties/a9e0a164-6de0-43a4-a640-0cbfb54220a4 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.0 9.8 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
OSV 3.0 9.8 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub 3.0 9.8 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
pypi litellm
<1.34.42
1.34.42

Affected products

  • berriai berriai/litellm
  • berriai litellm

Classification

Weakness
  • CWE-76 Improper Neutralization of Equivalent Special Elements

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.