LiteLLMPublished 27 Jun 2024NVD status: Modified

CVE-2024-5751

BerriAI/litellm version v1.35.8 contains a vulnerability where an attacker can achieve remote code execution.

ComponentLiteLLM
Severitycritical (CVSS 9.8)
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Published (NVD)2024-06-27
Last modified2026-06-17
Affected versions
< 1.40.16
from the GitHub-reviewed advisory GHSA-gppg-gqw8-wh9g
Fixed in1.40.16
WeaknessCWE-94
CISA KEVnot listed

NVD description

BerriAI/litellm version v1.35.8 contains a vulnerability where an attacker can achieve remote code execution. The vulnerability exists in the add_deployment function, which decodes and decrypts environment variables from base64 and assigns them to os.environ. An attacker can exploit this by sending a malicious payload to the /config/update endpoint, which is then processed and executed by the server when the get_secret function is triggered. This requires the server to use Google KMS and a database to store a model.

What to do

  • Upgrade LiteLLM to 1.40.16 or later.
  • Do not expose the component's API or UI to the internet without authentication in front of it.

Sources

Read more