Skip to content
LiteLLMGHSA-7ggm-4rjg-594w

litellm passes untrusted data to `eval` function without sanitization

High7.2CVE-2024-4264 · Published May 18, 2024 · updated Sep 10, 2026

A remote code execution (RCE) vulnerability exists in the berriai/litellm project due to improper control of the generation of code when using the `eval` function unsafely in the `litellm.get_secret()` method. Specifically, when the server utilizes Google KMS, untrusted data is passed to the `eval` function without any sanitization. Attackers can exploit this vulnerability by injecting malicious values into environment variables through the `/config/update` endpoint, which allows for the update of settings in `proxy_server_config.yaml`.

GitHub advisory

Affected versions

PackageAffectedFixed in
litellm
PyPI
<= 1.28.11No fix yet
Details and references

More LiteLLM advisories

All LiteLLM
Advisory
litellm vulnerable to improper access control in team management
Medium5.3Jun 27, 2024
litellm vulnerable to remote code execution based on using eval unsafely
Critical9.8Jun 27, 2024
SQL injection in litellm
Medium6.4Jun 6, 2024
SQL injection in litellm
Medium4.9Jun 6, 2024
Arbitrary file deletion in litellm
High6.5Jun 6, 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.