Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. litellm
  4. ›
  5. CVE-2024-6825

CVE-2024-6825: LiteLLM Vulnerable to Remote Code Execution (RCE)

March 20, 2025

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.

References

  • github.com/BerriAI/litellm
  • github.com/BerriAI/litellm/blob/056913fd7049923a106130b02d7c29e7f312beec/litellm/utils.py
  • github.com/advisories/GHSA-53gh-p8jc-7rg8
  • huntr.com/bounties/1d98bebb-6cf4-46c9-87c3-d3b1972973b5
  • nvd.nist.gov/vuln/detail/CVE-2024-6825

Code Behaviors & Features

Detect and mitigate CVE-2024-6825 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 1.40.3.dev2 up to 1.40.12

Solution

Unfortunately, there is no solution available yet.

Impact 8.8 HIGH

CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')

Source file

pypi/litellm/CVE-2024-6825.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:43 +0000.