CVE-2024-5751: berriai/litellm · Code Injection
Affects berriai/litellmSource CVE Database V5
Not known to be exploited · CVSS 9.8 Critical.
Data as of 26 Oct 2026, 14:05 UTC
- 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:HExploitation evidence
Disclosed: evidence found.
CVE published 27 Jun 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by 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
| Product | Affected | Fixed in |
|---|---|---|
GitHubberriai/litellmpkg:github/berriai/litellmOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
- Immediately update berriai/litellm to a patched version once available from the vendor. Monitor vendor advisories for official patches.
- 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.
- Implement strict input validation and sanitization on all inputs processed by add_deployment, especially those involving environment variable assignments.
- Review and harden the use of Google KMS and database configurations to ensure minimal privileges and audit logging are enabled.
- Employ runtime application self-protection (RASP) or web application firewalls (WAF) with custom rules to detect and block suspicious payloads targeting the vulnerable endpoint.
- Conduct thorough security audits and penetration testing focused on the deployment and configuration of berriai/litellm instances.
- Monitor logs and alerts for unusual activity related to environment variable changes or calls to get_secret function.
- 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.