CVE-2024-2952: Server-Side Template Injection in BerriAI/litellm

Published Apr 10, 2024
·
Updated

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 Software

2 affected componentsFixes available
pip/litellm<1.34.42
1.34.42
LiteLLM LiteLLM<1.34.42

Event History

Apr 10, 2024
CVE Published
via MITRE·05:07 PM
Data Sourced
via MITRE·05:07 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:15 PM
RemedyAffected Software
Advisory Published
via GitHub·06:30 PM

Frequently Asked Questions

1

What is the severity of CVE-2024-2952?

CVE-2024-2952 has a high severity rating due to the potential for Server-Side Template Injection, which can lead to remote code execution.

2

How do I fix CVE-2024-2952?

To fix CVE-2024-2952, update litellm to version 1.34.42 or later.

3

What is Server-Side Template Injection as described in CVE-2024-2952?

Server-Side Template Injection allows an attacker to execute arbitrary template code on the server by injecting malicious content via user input.

4

What impact does CVE-2024-2952 have on my application?

Exploitation of CVE-2024-2952 could allow attackers to execute arbitrary code on the server, potentially compromising the entire system.

5

Which versions of litellm are affected by CVE-2024-2952?

CVE-2024-2952 affects versions of litellm prior to 1.34.42.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203