Code Injection Affecting litellm package, versions [,1.40.16)


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.09% (41st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-LITELLM-7361760
  • published30 Jun 2024
  • disclosed15 Jun 2024
  • credittrongphuc12

Introduced: 15 Jun 2024

CVE-2024-5751  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade litellm to version 1.40.16 or higher.

Overview

litellm is a Library to easily interface with LLM API providers

Affected versions of this package are vulnerable to Code Injection via the add_deployment() function, which can decrypt base64 encoded values and assign them to os.eviron variables. An attacker can set some vulnerable values via the /config/update endpoint, which will be set in the environment when the model is invoked. If Google KMS is in use, the model invocation will also trigger a call to get_secret() to retrieve the malicious values which have been decrypted, and pass their values to the eval() function.

CVSS Scores

version 4.0
version 3.1