Skip to content
LiteLLMGHSA-gppg-gqw8-wh9g

litellm vulnerable to remote code execution based on using eval unsafely

Critical9.8CVE-2024-5751 · Published Jun 27, 2024 · updated Sep 10, 2026

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.

GitHub advisory

Affected versions

PackageAffectedFixed in
litellm
PyPI
< 1.40.161.40.16
Details and references

More LiteLLM advisories

All LiteLLM
Advisory
litellm vulnerable to improper access control in team management
Medium5.3Jun 27, 2024
Arbitrary file deletion in litellm
High6.5Jun 6, 2024
SQL injection in litellm
Medium4.9Jun 6, 2024
SQL injection in litellm
Medium6.4Jun 6, 2024
litellm passes untrusted data to `eval` function without sanitization
High7.2May 18, 2024
LiteLLM has Server-Side Template Injection vulnerability in /completions endpoint
Critical9.8Apr 10, 2024

Critical advisories by email

Wednesdays: the week’s critical and high advisories in the AI and data stack, with the fixed versions. Only in weeks that have some.

Double opt-in. Unsubscribe any time.