litellm vulnerable to remote code execution based on using eval unsafely
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | litellm | < 1.40.16 | 1.40.16 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-5751
- https://github.com/BerriAI/litellm/pull/4228
- https://github.com/BerriAI/litellm/commit/fcea4c22ad96b24436f196ae709f71932e84b0b8
- https://github.com/berriai/litellm
- https://huntr.com/bounties/ae623c2f-b64b-4245-9ed4-f13a0a5824ce
- https://pypi.org/project/litellm
- https://github.com/advisories/GHSA-gppg-gqw8-wh9g
- CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H- Weakness (CWE)
CWE-94- Platform
- Python (PyPI)
- Package
litellm- Disclosed
- 27.06.2024
- Updated
- 11.10.2026 15:17
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2026-389 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-gppg-gqw8-wh9g - CC BY 4.0
Vulnerability history: litellm
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 42
- First → latest
- 04.2024 09.2026
- Without a fix
- 14
- Exploited in attacks
- 3
Severity breakdown
- Critical 7
- High 17
- Medium 8
- Low 9
- Unrated 1
Disclosures per year
- 2024: 8
- 2025: 6
- 2026: 28
-
litellm vulnerable to remote code execution based on using eval unsafely this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.