Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

GHSA-46cm-pfwv-cgf8: LiteLLM has Server-Side Template Injection vulnerability in /completions endpoint

0
Critical
Published: 04/10/2024 (04/10/2024, 18:30:48 UTC)
Source: GCVE Database
Product: litellm

Description

LiteLLM versions prior to 1.34.42 contain a Server-Side Template Injection (SSTI) vulnerability in the /completions endpoint. The vulnerability occurs because the hf_chat_template method processes the chat_template parameter from the tokenizer_config.json file using the Jinja template engine without proper sanitization. This allows attackers to craft malicious tokenizer_config.json files that can execute arbitrary code on the server. The vulnerability is classified as critical due to its potential to compromise confidentiality, integrity, and availability.

CVSS v3.0

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected software

PyPIghsa
litellm
Affected versions
<1.34.42

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/06/2026, 23:36:19 UTC

Technical Analysis

LiteLLM (BerriAI/litellm) is affected by a Server-Side Template Injection vulnerability (CVE-2024-2952) in the /completions endpoint. The issue stems from the hf_chat_template method processing the chat_template parameter from tokenizer_config.json through the Jinja template engine without adequate sanitization. This flaw enables attackers to execute arbitrary code on the server by supplying maliciously crafted tokenizer_config.json files. The vulnerability affects all versions prior to 1.34.42 and has a CVSS 3.0 base score indicating critical severity with network attack vector, low attack complexity, no privileges required, no user interaction, and full impact on confidentiality, integrity, and availability.

Potential Impact

Successful exploitation of this vulnerability allows remote attackers to execute arbitrary code on the server hosting LiteLLM by sending specially crafted tokenizer_config.json files. This compromises the confidentiality, integrity, and availability of the affected system, potentially leading to full system compromise.

Mitigation Recommendations

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-46cm-pfwv-cgf8
Osv Schema Version
1.4.0
Aliases
["CVE-2024-2952"]
Ecosystems
["PyPI"]
Database Specific Severity
CRITICAL
Cvss Version
3.0

Threat ID: 6a4c345d27e9c797195ffcb5

Added to database: 07/06/2026, 23:03:57 UTC

Last enriched: 07/06/2026, 23:36:19 UTC

Last updated: 07/06/2026, 23:36:19 UTC

Views: 2

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses