CVE-2024-6825

Remote Code Execution in BerriAI/litellm

State
Published
Severity
8.8 High
Published
Mar 20, 2025
Updated
Oct 15, 2025
Reserved
Jul 16, 2024

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.08.8 HighCVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H@huntr_ai

Weaknesses

  • CWE-94 Improper Control of Generation of Code

Affected Products

ProductVersions
berriai/litellmberriai
  • before v1.65.4.dev6Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.