Skip to main content
VulnerabilityPublished Updated

CVE-2024-5751: berriai/litellm · Code Injection

Affects berriai/litellmSource CVE Database V5

0

Not known to be exploited · CVSS 9.8 Critical.

Data as of 26 Oct 2026, 14:05 UTC

CVSS 3.0 base score
9.8Critical
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.8% chance of exploitation in 30 days – higher than 58% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
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. Weaponised: 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 26 Oct 2026.

What to do

Affected software

ProductAffectedFixed in
GitHubberriai/litellmpkg:github/berriai/litellmOther threatsAffected
  • =1.35.8
Fixed in–

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

AI-suggested

  1. Immediately update berriai/litellm to a patched version once available from the vendor. Monitor vendor advisories for official patches.
  2. Until a patch is released, restrict access to the /config/update endpoint using network-level controls such as firewalls or API gateways to limit exposure to trusted IP addresses only.
  3. Implement strict input validation and sanitization on all inputs processed by add_deployment, especially those involving environment variable assignments.
  4. Review and harden the use of Google KMS and database configurations to ensure minimal privileges and audit logging are enabled.
  5. Employ runtime application self-protection (RASP) or web application firewalls (WAF) with custom rules to detect and block suspicious payloads targeting the vulnerable endpoint.
  6. Conduct thorough security audits and penetration testing focused on the deployment and configuration of berriai/litellm instances.
  7. Monitor logs and alerts for unusual activity related to environment variable changes or calls to get_secret function.
  8. Educate DevOps and security teams about the risks of improper code generation and environment variable handling to prevent similar vulnerabilities in custom code.

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.

References

Community reviews

Loading reviews…