CVE-2024-5751: litellm vulnerable to remote code execution based on using eval unsafely
9.8
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.74271%
CWE
Published
6/27/2024
Updated
6/28/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
litellm | pip | < 1.40.16 | 1.40.16 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from the removed eval() call in get_secret() shown in the diff. This function processed attacker-controlled encrypted_secret values from the /config/update endpoint via add_deployment. The eval() on encrypted_secret.encode() enabled RCE by allowing execution of arbitrary Python code in the payload. The patch replaced this dangerous eval() with a safety check, confirming this was the vulnerable code path.