litellm@1.31.2.dev10 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
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?

There is no fixed version for litellm.

[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 /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?

There is no fixed version for litellm.

[0,)
  • 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')?

There is no fixed version for litellm.

[0,)
  • 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)