Code Injection Affecting litellm package, versions [,1.40.16)


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team

    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 ID SNYK-PYTHON-LITELLM-7361760
  • published 30 Jun 2024
  • disclosed 15 Jun 2024
  • credit trongphuc12

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
Expand this section

Snyk

Recommended
9 critical
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    High
  • Attack Requirements (AT)
    Present
  • Privileges Required (PR)
    Low
  • User Interaction (UI)
    None
  • Confidentiality (VC)
    High
  • Integrity (VI)
    High
  • Availability (VA)
    High
  • Confidentiality (SC)
    High
  • Integrity (SI)
    High
  • Availability (SA)
    High