Skip to main content
VulnerabilityPublished Updated

CVE-2024-2952: LiteLLM Has Server-Side Template Injection Vulnerability

Affects litellmSource GCVE Database

0
Compare

Not known to be exploited · CVSS 9.8 Critical : upgrade to 1.34.42 as a priority.

Data as of 3 Nov 2026, 22:57 UTC

CVSS 3.0 base score
9.8Critical
How severe the flaw is on the 0–10 CVSS scale.
EPSS
1.2% chance of exploitation in 30 days – higher than 69% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 1.34.42
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 10 Apr 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 3 Nov 2026.

What to do

Upgrade litellm to 1.34.42.

Affected software

ProductAffectedFixed in
PyPIlitellmAffected
  • <1.34.42
Fixed in
  • 1.34.42

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A fix is available in LiteLLM version 1.34.42 and later. Users should upgrade to version 1.34.42 or newer to remediate this vulnerability. Since this is not a cloud service, remediation requires applying the update to affected installations. Patch status is confirmed by the affectedVersions field indicating versions <1.34.42 are vulnerable and fixed in 1.34.42.

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.

References

Community reviews

Loading reviews…