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

Severity (CVSS 3.0)8.8High
Exploit odds (30 days)1.7%top 23.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
PyPIlitellmno fix listedGHSA-53gh-p8jc-7rg8
PyPIlitellmno fix listedPYSEC-2026-1541

Affected products (as reported)

VendorProductVersions
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

References