RCE in Berriai Berriai/litellm

CVE-2024-6825

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.

Vulnerability class: RCE (Remote Code Execution)

EPSS: 0.015 (71.6th percentile) — read the EPSS interpretation.

CVSS v3 metric

CVSS v3 base score 8.8 (High). Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.

Affected products

Weakness classification (CWE)

Public proof-of-concept exploits

References

Frequently asked questions

What is CVE-2024-6825?
CVE-2024-6825 is a high-severity vulnerability in Berriai Berriai/litellm, classified under Code Injection. CVSS score: 8.8/10. Published 2025-03-20.
How severe is CVE-2024-6825?
High severity. CVSS v3 base score is 8.8 out of 10.
Is CVE-2024-6825 known to be exploited?
1 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.