Skip to main content
VulnerabilityPublished Updated

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

Affects berriai/litellmSource CVE Database V5

0

Not known to be exploited · CVSS 8.8 High.

Data as of 26 Oct 2026, 14:05 UTC

CVSS 3.0 base score
8.8High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
1.6% chance of exploitation in 30 days – higher than 76% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 20 Mar 2025

  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.40.12
Fixed in–

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

AI-suggested

To mitigate CVE-2024-6825, European organizations should: 1) Immediately audit and restrict access to the 'post_call_rules' configuration to trusted administrators only, preventing unauthorized modification. 2) Implement strict input validation and sanitization on any configuration parameters that specify callback functions, disallowing system-level or unsafe modules and functions. 3) Employ application-level whitelisting of allowed callback modules and functions to prevent arbitrary imports. 4) Monitor system logs and AI application behavior for unusual command execution patterns or unexpected subprocess invocations. 5) Isolate AI chatbot environments using containerization or sandboxing to limit the impact of potential exploitation. 6) Engage with BerriAI or the open-source community to track patch releases and apply updates promptly once available. 7) Consider disabling or removing the 'post_call_rules' feature if not essential for operation. 8) Conduct penetration testing focused on configuration injection vectors to identify exposure. These steps go beyond generic advice by focusing on configuration control, input validation, and environment isolation specific to this vulnerability's nature.

Description

BerriAI/litellm version 1.40.12 contains a vulnerability that allows remote code execution. The issue exists in the handling of the 'post_call_rules' configuration, where a callback function can be added. The provided value is split at the final '.' mark, with the last part considered the function name and the remaining part appended with the '.py' extension and imported. This allows an attacker to set a system method, such as 'os.system', as a callback, enabling the execution of arbitrary commands when a chat response is processed.

References

Community reviews

Loading reviews…