LiteLLMGHSA-53gh-p8jc-7rg8
LiteLLM Vulnerable to Remote Code Execution (RCE)
High8.8CVE-2024-6825 · Published Mar 20, 2025 · updated Sep 10, 2026
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 versions
| Package | Affected | Fixed in |
|---|---|---|
| litellm PyPI | >= 1.40.3.dev2, <= 1.40.12 | No fix yet |
Details and references
More LiteLLM advisories
All LiteLLM| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Mar 202025 | LiteLLM Has a Leakage of Langfuse API Keys | High7.5 | No fix yet |
| Mar 202025 | LiteLLM Has an Improper Authorization Vulnerability | High8.1 | 1.61.15 |
| Mar 202025 | LiteLLM Reveals Portion of API Key via a Logging File | High7.5 | 1.44.12 |
| Mar 202025 | LiteLLM Vulnerable to Denial of Service (DoS) via Crafted HTTP Request | High7.5 | 1.56.2 |
| Mar 202025 | LiteLLM Vulnerable to Denial of Service (DoS) | High7.5 | 1.53.1.dev1 |
| Sep 132024 | LiteLLM Server-Side Request Forgery (SSRF) vulnerability | High7.5 | 1.44.8 |