litellm@0.1.492 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)
  • H
Code Injection

litellm is a Library to easily interface with LLM API providers

Affected versions of this package are vulnerable to Code Injection due to the use of unvalidated input in the eval function within the secret management system. An attacker can execute arbitrary code by setting the UI_LOGO_PATH variable to a remote server address in the get_image function, leading to the writing of a malicious Google KMS configuration file to the cached_logo.jpg file. This file can then be used to execute arbitrary code by assigning malicious code to the SAVE_CONFIG_TO_DB environment variable, leading to full system control.

How to fix Code Injection?

Upgrade litellm to version 1.34.39 or higher.

[,1.34.39)
  • 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)
  • M
Improper Access Control

litellm is a Library to easily interface with LLM API providers

Affected versions of this package are vulnerable to Improper Access Control due to the Proxy using a hardcoded demo account with no permissions, posing a potential security risk.

How to fix Improper Access Control?

Upgrade litellm to version 1.35.1 or higher.

[,1.35.1)
  • M
Improper Access Control

litellm is a Library to easily interface with LLM API providers

Affected versions of this package are vulnerable to Improper Access Control where users could inadvertently delete files from the proxy server when accessing the /audio/transcriptions endpoint.

How to fix Improper Access Control?

Upgrade litellm to version 1.35.18 or higher.

[,1.35.18)
  • C
Improper Neutralization of Special Elements used in a Template Engine ('Template Injection')

litellm is a Library to easily interface with LLM API providers

Affected versions of this package are vulnerable to Improper Neutralization of Special Elements used in a Template Engine ('Template Injection') due to the hf_chat_template method processing the chat_template parameter from the tokenizer_config.json file through the Jinja template engine without proper sanitization. An attacker can execute arbitrary code on the server by crafting malicious tokenizer_config.json files.

How to fix Improper Neutralization of Special Elements used in a Template Engine ('Template Injection')?

Upgrade litellm to version 1.34.42 or higher.

[,1.34.42)