CVE-2024-6825 Details
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.
A remote code execution vulnerability exists in BerriAI Litellm version 1.40.12. The issue arises in the 'post_call_rules' configuration, where users can add callback functions. The provided function name is extracted by splitting the value at the last dot, with the final segment taken as the function name and the rest appended with a '.py' extension for import. This mechanism allows an attacker to specify system methods, such as 'os.system', as callbacks, which are then executed with arbitrary commands when processing chat responses.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 20, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/berriai/litellm/commit/441c7275ed2715f47650a7c2e525055c804073a9 | [email protected] | |
| https://huntr.com/bounties/1d98bebb-6cf4-46c9-87c3-d3b1972973b5 | [email protected] | ExploitThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| litellm litellm | < 1.65.4 1.65.4 dev2 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Oct 15, 2025 | CVE Modified | [email protected] |
| Jul 15, 2025 | Initial Analysis | [email protected] |
| Mar 20, 2025 | New CVE Received | [email protected] |