Platform
python
Component
litellm
Fixed in
v1.65.4.dev6
1.40.13
CVE-2024-6825 is a Remote Code Execution (RCE) vulnerability affecting versions of the litellm Python library up to 1.40.12. This flaw allows attackers to execute arbitrary commands on a system by manipulating the 'postcallrules' configuration. A fix is available in version v1.65.4.dev6, and users are strongly encouraged to upgrade immediately.
The vulnerability lies in the way litellm handles the 'postcallrules' configuration, which allows users to define callback functions to be executed after a chat response is processed. An attacker can exploit this by injecting a malicious callback function name. The library splits the provided value at the final '.' mark, treating the last part as the function name and appending '.py'. This allows an attacker to specify a system method, such as 'os.system', as the callback, effectively enabling arbitrary command execution when a chat response is processed. The potential impact is severe, as an attacker could gain complete control over the system running the litellm library, leading to data breaches, system compromise, and further malicious activity.
CVE-2024-6825 was published on 2025-03-20. Currently, there are no publicly available proof-of-concept exploits. The EPSS score is pending evaluation. While no active exploitation campaigns have been confirmed, the ease of exploitation makes this a high-priority vulnerability to address.
Exploit Status
EPSS
1.35% (80% percentile)
CISA SSVC
CVSS Vector
The primary mitigation for CVE-2024-6825 is to upgrade to version v1.65.4.dev6 or later. If upgrading immediately is not feasible, consider temporarily disabling the 'postcallrules' configuration to prevent the vulnerability from being exploited. Review existing 'postcallrules' configurations for any suspicious or unexpected function names. Implement input validation and sanitization on any user-provided data used in the 'postcallrules' configuration to prevent malicious code injection. Monitor system logs for any unusual activity or command executions related to litellm.
Actualice la biblioteca litellm a la versión 1.65.4.dev6 o superior. Esto corrige la vulnerabilidad de ejecución remota de código al validar correctamente las funciones de callback configuradas en 'post_call_rules'. Asegúrese de verificar la integridad de la nueva versión después de la actualización.
Vulnerability analysis and critical alerts directly to your inbox.
CVE-2024-6825 is a Remote Code Execution vulnerability in litellm versions up to 1.40.12, allowing attackers to execute arbitrary commands through the 'postcallrules' configuration.
You are affected if you are using litellm version 1.40.12 or earlier. Check your version and upgrade immediately.
Upgrade to version v1.65.4.dev6 or later. As a temporary workaround, disable the 'postcallrules' configuration.
No active exploitation campaigns have been confirmed, but the vulnerability's ease of exploitation warrants immediate attention and mitigation.
Refer to the litellm project's official security advisories and release notes on their GitHub repository for the latest information.
Upload your dependency file and we'll tell you instantly if this and other CVEs hit you.
Upload your requirements.txt file and we'll tell you instantly if you're affected.