Vulnerability · Published Mar 20, 2025 · Assigned by @huntr_ai
CVE-2024-6825Remote Code Execution in BerriAI/litellm
High 8.8
In plain English
A high-severity code injection in berriai/litellm from berriai. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.7% (higher than 77% of all known vulnerabilities).
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | litellm | no fix listed | GHSA-53gh-p8jc-7rg8 |
| PyPI | litellm | no fix listed | PYSEC-2026-1541 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| berriai | berriai/litellm | unspecified – before v1.65.4.dev6 |
Weakness: CWE-94 · Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H