CVE-2024-4264CWE-94

Remote Code Execution in berriai/litellm

Critical · published May 18, 2024

CVSS v3.0
9.8
EPSS
1%
Percentile
58.8
In the wild
Unconfirmed
What it is

🚨 An unsafe `eval` call is the gateway to disaster! In the berriai/litellm project, attackers can inject malicious values through environment variables, potentially taking control of your system. 🔥 Think of this vulnerability like a chef who blindly follows a recipe without checking the ingredients. If an untrustworthy source slips in a harmful spice, the entire dish could become toxic! An attacker could inject arbitrary code and execute it on the server, leading to total remote control over the application. This means they could access sensitive data, alter configurations, or even launch further attacks against the entire infrastructure. It's a recipe for chaos!

Put simply

Think of this vulnerability like a chef who blindly follows a recipe without checking the ingredients. If an untrustworthy source slips in a harmful spice, the entire dish could become toxic! This vulnerability arises from improper usage of the `eval` function in `litellm.get_secret()`, allowing unfiltered data from the `/config/update` endpoint to be executed as code. This makes it a prime target for remote code execution (RCE).

What to do

An attacker could inject arbitrary code and execute it on the server, leading to total remote control over the application. This means they could access sensitive data, alter configurations, or even launch further attacks against the entire infrastructure. It's a recipe for chaos! To mitigate this risk, ensure you sanitize all inputs that could reach the `eval` function, especially those coming from environment variables. Additionally, consider updating the `litellm` library to the latest version that addresses this vulnerability as soon as it’s released. Don't forget to audit your application for any other unsafe usages of `eval`. You've got this! By taking these steps, you can fortify your defenses and keep your system safe. 🛡️

The record
Technical detail
CVSS v3.0
9.8 · CRITICAL
Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00883 · 58.8th percentile
Weakness
CWE-94 · Improper Control of Generation of Code ('Code Injection')
Published
2024-05-18T00:00Z
EPSS history
Timeline
  • 18 MAY 00:00Z
    Remote Code Execution in berriai/litellm
    cvelistv5