Vulnerability · Published Jun 27, 2024 · Assigned by @huntr_ai

CVE-2024-5751Remote Code Execution in BerriAI/litellm

Critical 9.8

In plain English

A critical-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 0.9% (higher than 59% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.0)9.8Critical
Exploit odds (30 days)0.9%top 40.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

BerriAI/litellm version v1.35.8 contains a vulnerability where an attacker can achieve remote code execution. The vulnerability exists in the `add_deployment` function, which decodes and decrypts environment variables from base64 and assigns them to `os.environ`. An attacker can exploit this by sending a malicious payload to the `/config/update` endpoint, which is then processed and executed by the server when the `get_secret` function is triggered. This requires the server to use Google KMS and a database to store a model.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPIlitellm1.40.16GHSA-gppg-gqw8-wh9g
PyPIlitellm1.40.16PYSEC-2026-389

Affected products (as reported)

VendorProductVersions
berriai berriai/litellm unspecified – through latest

Weakness: CWE-94 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

References