Free AI Safety Workshop — in collaboration with explainx.aiSave your seat
AgentbeamBeta
AI agent vulnerability · LiteLLM

CVE-2024-6825: LiteLLM Vulnerable to Remote Code Execution (RCE)

highCVSS 3.0 8.8GHSA-53gh-p8jc-7rg8

BerriAI/litellm version 1.40.12 contains a vulnerability that allows remote code execution. The issue exists in the handling of the 'postcallrules' 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.

Published Mar 20, 2025 · Updated Oct 15, 2025

Affected packages

litellm

Ecosystem
PyPI
Affected
>= 1.40.3.dev2, <= 1.40.12
Fixed in
No patched version yet
Check
pip show litellm

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More LiteLLM vulnerabilities

All LiteLLM entries