LitellmApplication

CVE-2024-5751

CRITICAL · 9.8 CVSS v3.1 Published 2024-06-27
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · moderate confidence

BerriAI/litellm v1.35.8 contains an RCE vulnerability in the `add_deployment` function where base64-decrypted environment variables from the `/config/update` endpoint are blindly assigned to `os.environ`. When `get_secret` is triggered, attacker-controlled environment variables can be leveraged to execute arbitrary code on the server. Exploitation requires the target to use Google KMS and have a database configured to store models.

MitigationUpgrade to a patched version that sanitizes and validates all environment variable values before os.environ assignment, or implement strict input validation on the /config/update endpoint to reject malicious payloads. Consider disabling remote config updates if not required.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
LitellmApplication
Affected:= 1.35.8

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Confirm Litellm version
    Run 'pip show litellm' or check your package manager to identify the installed version of litellm
    Affected if The installed version is exactly 1.35.8
  2. Verify Google KMS is in use
    Check your Litellm configuration files or environment variables for Google KMS credentials or settings (such as GOOGLE_APPLICATION_CREDENTIALS, GOOGLE_KMS_KEY_RING, or similar)
    Affected if Google KMS is configured as the secrets manager
  3. Confirm database for model storage
    Inspect your Litellm database configuration (DATABASE_URL, SQLALCHEMY_DATABASE_URI, or similar environment variables) to verify a database is connected and configured to store models
    Affected if A database is configured and connected for model storage
  4. Check exposure of /config/update endpoint
    Review your web server or API gateway configuration to determine if the /config/update endpoint is externally accessible or accepts requests
    Affected if The /config/update endpoint is accessible without proper authentication or network restrictions
  5. Examine os.environ usage in get_secret
    Review Litellm logs or code execution traces to identify if attacker-controlled environment variables could be processed through the get_secret function during runtime
    Affected if The get_secret function processes environment variables that originate from the /config/update endpoint without validation

You are affected if running Litellm version 1.35.8 with Google KMS configured, a database for model storage, and the /config/update endpoint is accessible to inject malicious base64-encoded environment variables that get blindly assigned to os.environ.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

From vendor data
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Upgrade to a patched version that sanitizes and validates all environment variable values before os.environ assignment, or implement strict input validation on the /config/update endpoint to reject malicious payloads. Consider disabling remote config updates if not required.

Fix this in Litellm Scoped from the published advisory
  • Consultation4.0 h
  • Implementation8.0 h
  • Testing6.0 h
  • Review / QA4.0 h
22.0 hours of engineering $3,860
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $6,176.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2024-5751 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2024-5751 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data