Skip to content
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.

GitHub advisory

Affected versions

PackageAffectedFixed in
litellm
PyPI
>= 1.40.3.dev2, <= 1.40.12No fix yet
Details and references

More LiteLLM advisories

All LiteLLM
Advisory
LiteLLM Has a Leakage of Langfuse API Keys
High7.5Mar 20, 2025
LiteLLM Has an Improper Authorization Vulnerability
High8.1Mar 20, 2025
LiteLLM Reveals Portion of API Key via a Logging File
High7.5Mar 20, 2025
LiteLLM Vulnerable to Denial of Service (DoS) via Crafted HTTP Request
High7.5Mar 20, 2025
LiteLLM Vulnerable to Denial of Service (DoS)
High7.5Mar 20, 2025
LiteLLM Server-Side Request Forgery (SSRF) vulnerability
High7.5Sep 13, 2024

Critical advisories by email

Wednesdays: the week’s critical and high advisories in the AI and data stack, with the fixed versions. Only in weeks that have some.

Double opt-in. Unsubscribe any time.