litellm@1.37.5 vulnerabilities

Library to easily interface with LLM API providers

Direct Vulnerabilities

Known vulnerabilities in the litellm package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • H
Server-Side Request Forgery (SSRF)

litellm is a Library to easily interface with LLM API providers

Affected versions of this package are vulnerable to Server-Side Request Forgery (SSRF) via the api_base parameter used in POST requests at the /chat/completions endpoint. This value can be set to a malicious domain, allowing the owner of that domain to retrieve the OpenAI API keys.

How to fix Server-Side Request Forgery (SSRF)?

Upgrade litellm to version 1.44.8 or higher.

[,1.44.8)
  • C
Code Injection

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.

How to fix Code Injection?

Upgrade litellm to version 1.40.16 or higher.

[,1.40.16)
  • M
SQL Injection

litellm is a Library to easily interface with LLM API providers

Affected versions of this package are vulnerable to SQL Injection through the /global/spend/logs endpoint. An authenticated attacker can manipulate data and potentially gain unauthorized access by injecting malicious SQL commands into the api_key parameter.

How to fix SQL Injection?

Upgrade litellm to version 1.40.0 or higher.

[,1.40.0)
  • M
SQL Injection

litellm is a Library to easily interface with LLM API providers

Affected versions of this package are vulnerable to SQL Injection through the /team/update process. An attacker can extract or manipulate sensitive data by injecting malicious SQL commands into the user_id parameter.

How to fix SQL Injection?

Upgrade litellm to version 1.49.6 or higher.

[,1.49.6)
  • H
Improper Control of Generation of Code ('Code Injection')

litellm is a Library to easily interface with LLM API providers

Affected versions of this package are vulnerable to Improper Control of Generation of Code ('Code Injection') via the eval function in the litellm.get_secret() method. An attacker can execute arbitrary code by injecting malicious values into environment variables through the /config/update endpoint, which allows for the update of settings in proxy_server_config.yaml.

How to fix Improper Control of Generation of Code ('Code Injection')?

Upgrade litellm to version 1.40.16 or higher.

[,1.40.16)