BerriAI/litellm processes a callback value from the post_call_rules configuration by splitting the string at the final . character. The last part is treated as the function name, while the preceding part is given a .py extension and imported to create the callback. If an attacker can control or alter this value, they can specify a system method such as os.system, causing arbitrary commands to execute when LiteLLM processes a chat response.
The flaw is classified under CWE-94 because externally influenced data is used to determine code or a module to load. The referenced fix commit adds checks before loading the callback module and rejects dangerous modules, but the available evidence does not identify which released version contains that change.
The exact API, configuration path, or administrative workflow that permits an attacker to change post_call_rules is not established by the supplied evidence. Actual exposure therefore depends on the LiteLLM deployment model, configuration permissions, and whether the callback path is enabled.