Skip to main content
VulnerabilityPublished Updated

CVE-2024-5751: litellm vulnerable to remote code execution based on using eval unsafely

Affects litellmSource GCVE Database

0
Compare
Authoritative record:CVE-2024-5751· Critical 9.8

Not known to be exploited · CVSS 9.8 Critical : upgrade to 1.40.16 as a priority.

Data as of 16 Nov 2026, 17:33 UTC

CVSS 3.0 base score
9.8Critical
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 1.40.16
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 27 Jun 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 15 Nov 2026.

What to do

Upgrade litellm to 1.40.16.

Affected software

ProductAffectedFixed in
PyPIlitellmAffected
  • <1.40.16
Fixed in
  • 1.40.16

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Upgrade litellm to version 1.40.16 or later, where this vulnerability is fixed. Applying this official patch fully mitigates the risk. No additional mitigations are specified or required beyond applying the update.

Description

A critical remote code execution vulnerability (CVE-2024-5751) affects litellm versions prior to 1.40.16. The flaw exists in the add_deployment function, which unsafely uses eval by decoding and decrypting environment variables and assigning them to os.environ. An attacker can exploit this by sending a crafted payload to the /config/update endpoint, leading to arbitrary code execution when the get_secret function is called. This vulnerability requires the server to be configured with Google KMS and a database for model storage. The issue is fixed in version 1.40.16.

References

Community reviews

Loading reviews…