What’s Vulnerable › Vulnerabilities
CVE-2024-6825: Remote Code Execution in BerriAI/litellm
- Severity: high (CVSS 8.8 v3.0)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.7% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2025-03-20 · updated 2026-06-17
- Weakness: CWE-94
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.
Affected products
- BerriAI litellm: before 1.65.4; 1.65.4-dev2 — fixed in 1.65.4
How to fix
Upgrade to a fixed version: BerriAI litellm 1.65.4. Check the vendor advisory for mitigations.
References
- https://github.com/berriai/litellm/commit/441c7275ed2715f47650a7c2e525055c804073a9
- https://huntr.com/bounties/1d98bebb-6cf4-46c9-87c3-d3b1972973b5
Get alerted when CVE-2024-6825 or the next vulnerability affects your stack