Skip to content
Submit incident
AII-1001-85733
ConfirmedA court, a regulator or the organization itself has stated the core facts, or the record cites a court or regulator source.

Remote Code Execution in BerriAI/litellm (CVE-2024-6825)

A remote code execution vulnerability (CVE-2024-6825) was reported in BerriAI's litellm library, allowing arbitrary code execution through improper module import validation. The vendor patched the vulnerability by implementing security checks to block imports of dangerous Python modules.

20 March 2025 Β· BerriAI Β· Security and cyberattacks
20 March 2025
AII-1001-857333 sources ↓
Quick facts
Organization
BerriAI (subject)
Category
Security and cyberattacks
Source
github.com
Date
20 March 2025
Drafted by
Raidu Incident Detection

What happened

A remote code execution vulnerability (CVE-2024-6825) was identified in BerriAI's litellm, an open-source library for interfacing with multiple large language models. The vulnerability existed in the module loading functionality of the proxy component, which failed to properly restrict imports of dangerous Python modules.

Index analysis

The vulnerability allowed attackers to execute arbitrary code by importing and executing dangerous modules including os, sys, subprocess, shutil, socket, multiprocessing, threading, ctypes, pickle, marshal, and builtins through the get_instance_fn function.

Governance controls

BerriAI implemented a security_checks function in the proxy module that validates module names before import and raises an ImportError when attempting to import from a list of dangerous modules. The fix was applied in commit 441c7275ed2715f47650a7c2e525055c804073a9, which added both the security check and corresponding test cases.

Classification

Organization
BerriAI (subject)
Category
Security and cyberattacks
Industry
IT infrastructure and hosting
Harm status
Potential harm
Intent
Unintentional
Timing
Unknown
Failure modes
Unsafe autonomous behaviour
AI systems
litellm

Sources and evidence

This record was researched and written by the Index, based on the following original reporting.

github.com
https://github.com/berriai/litellm/commit/441c7275ed2715f47650a7c2e525055c804073a9
huntr.com
https://huntr.com/bounties/1d98bebb-6cf4-46c9-87c3-d3b1972973b5
cve.org
NVD entry