{"id":"CVE-2024-5751","kind":"vulnerability","aliases":["CVE-2024-5751","GHSA-gppg-gqw8-wh9g"],"related":[],"title":"litellm vulnerable to remote code execution based on using eval unsafely","description":"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.","summary":"LiteLLM, a Python gateway for calling language models, evaluates attacker-supplied data in its config update path, so a crafted request to the /config/update endpoint can execute code on the server. The sources say an attacker gets remote code execution, which means taking over the server process.","severity":"critical","cvss":9.8,"epss":0.00882,"exploited":false,"exploited_at":null,"products":[{"name":"litellm","fixed":["1.40.16"],"affected":"< 1.40.16","ecosystem":"pypi"},{"name":"litellm","fixed":[],"affected":"= 1.35.8","ecosystem":"vendor"},{"via":"cpe","name":"litellm","fixed":[],"affected":"= 1.35.8","ecosystem":"pypi"}],"ecosystems":["pypi","vendor"],"tags":["ai-gateway","ai-tooling","cwe-94","litellm","python","self-hosted"],"not_affected_if":["library-only-use","no-config-update-endpoint","no-google-kms"],"how_to_check":"- Check the installed version with `pip show litellm`; versions below `1.40.16` are affected.\n- Look for a deployment that exposes the `/config/update` endpoint and uses Google KMS with a database to store models, since the sources say that setup is required.","fix":"- Upgrade `litellm` to `1.40.16` or later.","status":"open","published_at":"2024-06-27T19:15:16+00:00","first_seen_at":"2026-11-16T15:17:21+00:00","triaged_at":"2026-11-16T15:19:16+00:00","updated_at":"2026-11-16T15:37:59+00:00","category":"ai-tooling","confidence":0.8,"triage":{"at":"2026-11-16T15:19:16Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade `litellm` to `1.40.16` or later.","reach":"internet","title":"LiteLLM: unsafe eval in config update lets attackers run code","impact":"high","summary":"LiteLLM, a Python gateway for calling language models, evaluates attacker-supplied data in its config update path, so a crafted request to the /config/update endpoint can execute code on the server. The sources say an attacker gets remote code execution, which means taking over the server process.","audience":"businesses","category":"ai-tooling","nicknames":[],"who_cares":["litellm","python","ai-gateway","self-hosted"],"confidence":0.8,"fix_status":"available","needs_auth":"unknown","worst_case":"Attacker runs code on the LiteLLM server and reads its secrets.","analyst_note":"","how_to_check":"- Check the installed version with `pip show litellm`; versions below `1.40.16` are affected.\n- Look for a deployment that exposes the `/config/update` endpoint and uses Google KMS with a database to store models, since the sources say that setup is required.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["library-only-use","no-google-kms","no-config-update-endpoint"],"who_is_affected":"Teams running a LiteLLM proxy server that exposes the /config/update endpoint. The sources say exploitation requires the server to use Google KMS and a database to store a model, so proxies without that setup are less exposed. Library-only use inside an application that does not run the proxy is not described as affected.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"yes","severity_if_unknown":"critical"},"cost_usd":0.000756,"input_tokens":4684,"output_tokens":576,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-2024':13A,21A '-5751':14A,22A '-94':33B '/config/update':63B,134C 'achiev':97C 'add':106C 'ai':27B,30B 'ai-gateway':26B 'ai-tool':29B 'assign':118C 'attack':49B,75B,95C,123C 'attacker-suppli':48B 'base':7A 'base64':116C 'berriai/litellm':87C 'call':44B 'code':5A,67B,78B,99C 'config':54B 'contain':90C 'craft':59B 'cve':12A,20A 'cwe':32B 'data':51B 'databas':162C 'decod':110C 'decrypt':112C 'deploy':107C 'endpoint':64B,135C 'environ':113C 'eval':10A 'evalu':47B 'execut':6A,66B,79B,100C,141C 'exist':103C 'exploit':125C 'function':108C,149C 'gateway':28B,42B 'get':76B,147C 'ghsa':16A 'ghsa-gppg-gqw8-wh9g':15A 'googl':158C 'gppg':17A 'gqw8':18A 'host':38B 'kms':159C 'languag':45B 'litellm':1A,23A,24A,25A,34B,39B 'malici':130C 'mean':81B 'model':46B,166C 'os.environ':121C 'path':56B 'payload':131C 'process':86B,139C 'python':35B,41B 'remot':4A,77B,98C 'request':60B 'requir':153C 'say':73B 'secret':148C 'self':37B 'self-host':36B 'send':128C 'server':70B,85B,144C,155C 'sourc':72B 'store':164C 'suppli':50B 'take':82B 'tool':31B 'trigger':151C 'unsaf':11A 'updat':55B 'use':9A,157C 'v1.35.8':89C 'variabl':114C 'version':88C 'vulner':2A,92C,102C 'wh9g':19A","nicknames":[],"mitigations":[],"who_affected":"Teams running a LiteLLM proxy server that exposes the /config/update endpoint. The sources say exploitation requires the server to use Google KMS and a database to store a model, so proxies without that setup are less exposed. Library-only use inside an application that does not run the proxy is not described as affected.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"pkeys":["litellm"],"ptokens":["litellm"],"labels":["aigateway","aitooling","critical","cwe94","litellm","pypi","python","selfhosted","vendor"],"campaign_type":null,"search_a":"'-2024':13A,21A '-5751':14A,22A 'base':7A 'code':5A 'cve':12A,20A 'eval':10A 'execut':6A 'ghsa':16A 'ghsa-gppg-gqw8-wh9g':15A 'gppg':17A 'gqw8':18A 'litellm':1A,23A,24A,25A 'remot':4A 'unsaf':11A 'use':9A 'vulner':2A 'wh9g':19A","search_b":"'-94':33B '/config/update':63B 'ai':27B,30B 'ai-gateway':26B 'ai-tool':29B 'attack':49B,75B 'attacker-suppli':48B 'call':44B 'code':67B,78B 'config':54B 'craft':59B 'cwe':32B 'data':51B 'endpoint':64B 'evalu':47B 'execut':66B,79B 'gateway':28B,42B 'get':76B 'host':38B 'languag':45B 'litellm':34B,39B 'mean':81B 'model':46B 'path':56B 'process':86B 'python':35B,41B 'remot':77B 'request':60B 'say':73B 'self':37B 'self-host':36B 'server':70B,85B 'sourc':72B 'suppli':50B 'take':82B 'tool':31B 'updat':55B","search_c":"'/config/update':134C 'achiev':97C 'add':106C 'assign':118C 'attack':95C,123C 'base64':116C 'berriai/litellm':87C 'code':99C 'contain':90C 'databas':162C 'decod':110C 'decrypt':112C 'deploy':107C 'endpoint':135C 'environ':113C 'execut':100C,141C 'exist':103C 'exploit':125C 'function':108C,149C 'get':147C 'googl':158C 'kms':159C 'malici':130C 'model':166C 'os.environ':121C 'payload':131C 'process':139C 'remot':98C 'requir':153C 'secret':148C 'send':128C 'server':144C,155C 'store':164C 'trigger':151C 'use':157C 'v1.35.8':89C 'variabl':114C 'version':88C 'vulner':92C,102C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2024-06-27T19:15:16+00:00","kev":null,"cvss_vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-gppg-gqw8-wh9g","url":"https://github.com/advisories/GHSA-gppg-gqw8-wh9g","severity":"critical","published_at":"2024-06-27T21:32:08+00:00","modified_at":"2026-11-16T15:17:18+00:00","first_seen_at":"2026-11-16T15:17:21+00:00","fetched_at":"2026-11-16T15:26:32+00:00","note":null},{"source":"nvd","external_id":"CVE-2024-5751","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-5751","severity":null,"published_at":"2024-06-27T19:15:16+00:00","modified_at":"2026-06-17T08:16:35+00:00","first_seen_at":"2026-11-16T15:37:59+00:00","fetched_at":"2026-11-16T15:37:59+00:00","note":null}],"documents":[{"id":170355,"url":"https://github.com/BerriAI/litellm/pull/4228","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":170356,"url":"https://github.com/BerriAI/litellm/commit/fcea4c22ad96b24436f196ae709f71932e84b0b8","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":170688,"url":"https://huntr.com/bounties/ae623c2f-b64b-4245-9ed4-f13a0a5824ce","title":"Third-party advisory: huntr.com","kind":"advisory","source":"nvd","publisher":"research","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Third-party advisory: huntr.com"}],"disclosures":[],"exploit_sources":[{"type":"epss","score":0.00882,"url":"https://api.first.org/data/v1/epss?cve=CVE-2024-5751"}],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}