LiteLLMPublished 20 Mar 2025NVD status: Modified

CVE-2024-6825

BerriAI/litellm version 1.40.12 contains a vulnerability that allows remote code execution.

ComponentLiteLLM
Severityhigh (CVSS 8.8)
CVSS vectorCVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Published (NVD)2025-03-20
Last modified2026-06-17
Affected versions
< 1.65.4.dev6
from the CVE Program record written by the CNA that assigned the CVE
Fixed in1.65.4.dev6
WeaknessCWE-94
CISA KEVnot listed

Versions, checked against NVD

NVD's analysis gives the same ranges as the CVE record written by @huntr_ai, the CNA that assigned the CVE.

NVD 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.

What to do

  • Upgrade LiteLLM to 1.65.4.dev6 or later.
  • Do not expose the component's API or UI to the internet without authentication in front of it.

Sources

Read more