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.
References (2)
Core 2
Core References
Exploit, Third Party Advisory
https://huntr.com/bounties/1d98bebb-6cf4-46c9-87c3-d3b1972973b5
Scores
CVSS v3
8.8
EPSS
0.0302
EPSS Percentile
86.7%
Attack Vector
NETWORK
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CISA SSVC
Vulnrichment
Exploitation
poc
Automatable
no
Technical Impact
total
Details
CWE
CWE-94
Status
published
Products (3)
litellm/litellm
1.65.4 dev2
litellm/litellm
< 1.65.4
pypi/litellm
1.40.3.dev2PyPI
Published
Mar 20, 2025
Tracked Since
Feb 18, 2026