litellm passes untrusted data to `eval` function without sanitization
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 software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | litellm | <= 1.28.11 | no fix |
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-4264
- https://github.com/BerriAI/litellm
- https://github.com/BerriAI/litellm/blob/main/litellm/proxy/proxy_server.py#L2104-L2108
- https://github.com/BerriAI/litellm/blob/main/litellm/proxy/proxy_server.py#L2118
- https://github.com/BerriAI/litellm/blob/main/litellm/proxy/proxy_server.py#L2509-L2517
- https://github.com/BerriAI/litellm/blob/main/litellm/proxy/proxy_server.py#L2562-L2577
- https://github.com/BerriAI/litellm/blob/main/litellm/utils.py#L9867-L9885
- https://huntr.com/bounties/a3221b0c-6e25-4295-ab0f-042997e8fc61
- https://pypi.org/project/litellm
- https://github.com/advisories/GHSA-7ggm-4rjg-594w
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H- Weakness (CWE)
CWE-94- Platform
- Python (PyPI)
- Package
litellm- Disclosed
- 18.05.2024
- Updated
- 11.10.2026 15:17
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2026-1542 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-7ggm-4rjg-594w - 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 passes untrusted data to `eval` function without sanitization 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.