CVE-2024-6825: berriai berriai/litellm Code Injection
Vulnerability summary
CVE-2024-6825 is a high (CVSS 8.8) Code Injection vulnerability in berriai berriai/litellm. EPSS estimates a 1.65% chance of exploitation in the next 30 days, higher than 76.1% of scored vulnerabilities. 1 public exploit is recorded.
Timeline
- 20-03-2025PublishedVulnerability first disclosed.
- 15-10-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
3 scores · 3 sources · 1 version- OSV · PypiEcosystem advisory · calculated8.8HighCVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- NVDNIST8.8HighCVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
1.65%
Chance of exploitation in the next 30 days
Percentile
76%
Versus all other CVEs
30-day change
0.00 pp
From 1.65% on 20-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundExploit Reference (huntr.com)
Maturity: unknown
Weaknesses
CWE · root causeAffected systems
Berriai1 product
- berriai/litellm≥ unspecified, < v1.65.4.dev6
Litellm1 product
- litellm< 1.65.4 | 1.65.4:dev2
PyPI1 product
- litellm≥ 1.40.3.dev2, ≤ 1.40.12
3 vendors · 3 products
References
7 links- github.com/BerriAI/litellmPACKAGE
- pypi.org/project/litellmPACKAGE