Vulnerability · Published May 18, 2024 · Assigned by @huntr_ai
CVE-2024-4264Remote Code Execution in berriai/litellm
Critical 9.8
In plain English
A critical-severity code injection in berriai/litellm from berriai. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.9% (higher than 59% of all known vulnerabilities).
Official description
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`.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | litellm | no fix listed | GHSA-7ggm-4rjg-594w |
| PyPI | litellm | no fix listed | PYSEC-2026-1542 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| berriai | berriai/litellm | unspecified – through latest |
Weakness: CWE-94 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H