Skip to main content

LiteLLM CVE-2026-59821

| EUVDEUVD-2026-42350 LOW
Code Injection (CWE-94)
2026-07-08 GitHub_M GHSA-72m8-9m7m-h278
2.1
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain or compromise guardrail admin credentials
  2. Delivery
    Craft malicious Python payload targeting process environment
  3. Exploit
    Submit payload via production guardrail create/update API
  4. Execution
    Code executes unsandboxed in proxy process
  5. Impact
    Harvest LLM API keys and secrets from environment

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a user account holding high-privilege guardrail management rights within the LiteLLM deployment - specifically, the ability to call the production guardrail create or update API paths. The CVSS PR:H metric confirms that standard authenticated users cannot exploit this; only accounts with explicit guardrail administration access are in scope. The Custom Code Guardrails feature must be accessible on the deployment (AT:P in CVSS 4.0 reflects this specific precondition). Network access to the LiteLLM proxy API is required (AV:N). Exploitation is NOT possible by unauthenticated external actors, standard non-admin users, or read-only privileged accounts. The vulnerability does not affect deployments where guardrail management access is restricted to a single trusted owner who already has full system access, as that actor presents no incremental threat beyond their existing capabilities.

Impact

The CVSS 4.0 score of 2.1 accurately reflects the constrained real-world risk profile: PR:H mandates a highly privileged account specifically scoped to guardrail management, and AT:P signals a required attack precondition beyond standard network access. This is fundamentally an insider threat or post-compromise lateral movement scenario, not an opportunistic external attack. Despite the RCE and Code Injection tags, the impact metrics are low across all dimensions (VC:L/VI:L/VA:L), and there is no scope change to subsequent systems (SC:N/SI:N/SA:N), meaning the blast radius is confined to the proxy process. No EPSS data was provided in the input, no CISA KEV listing exists, and no public proof-of-concept has been identified - all consistent with a narrow attack surface. The primary operational risk is in multi-operator LiteLLM deployments where guardrail create/update rights are delegated to non-owner privileged users who might be malicious or whose accounts could be compromised. For single-operator self-hosted deployments where only the owner has admin access, the incremental risk of this vulnerability is minimal since the owner already has full system access.

Exploit ScenarioDerived

A privileged LiteLLM operator with guardrail management rights - or an attacker who has compromised such an account - submits a malicious custom Python guardrail payload via the production create API endpoint. Because the production path lacks the sandboxing enforced by the test endpoint, the Python code executes directly inside the proxy process, reading environment variables such as OPENAI_API_KEY, ANTHROPIC_API_KEY, or database credentials, and exfiltrating them to an attacker-controlled endpoint. No public proof-of-concept has been identified, but the exploit is mechanically straightforward for any actor possessing valid guardrail admin credentials.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 08, 2026

Custom Code Guardrails in LiteLLM's AI Gateway proxy prior to 1.82.0-stable permitted privileged users with guardrail management rights to submit arbitrary Python code via the production create and update API paths, which executed unsandboxed within the proxy process. Unlike the test endpoint - which enforced sandbox controls - the production paths lacked equivalent validation, enabling the injected code to access and expose secrets, API keys, and environment variables available to the running process. No public exploit or active exploitation (CISA KEV) has been identified at time of analysis; risk is highest in multi-tenant or multi-operator LiteLLM deployments where guardrail management rights are distributed.

RemediationAI

The primary fix is to upgrade LiteLLM to version 1.82.0-stable or later, which applies consistent sandboxing and validation to both the test and production guardrail API paths; the release is available at https://github.com/BerriAI/litellm/releases/tag/v1.82.0-stable and the remediation commit can be reviewed at https://github.com/BerriAI/litellm/commit/e50b4486d0f7aa0497185a1ebcdd2c91f1769eba. Prior to patching, organizations should restrict access to the guardrail create and update API paths exclusively to fully trusted, owner-level administrators - removing this right from any delegated or shared privileged accounts eliminates the attack surface entirely since the vulnerability requires PR:H. Additionally, audit all existing custom guardrail code for malicious or unexpected logic, and proactively rotate LLM provider API keys and any other secrets stored in the proxy environment if suspicious guardrail activity is suspected. Note that restricting guardrail management access may impact workflows that rely on delegated guardrail administration.

Affected VersionsENISA

LiteLLM < 1.82.0-stable

Affected Packages

pypi litellm fix: 1.82.0-stable, 1.82.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

LiteLLM (CPE: cpe:2.3:a:berriai:litellm:*:*:*:*:*:*:*:*) is an open-source AI Gateway that proxies requests to various LLM provider APIs in a unified OpenAI-compatible format. Its Custom Code Guardrails feature allows operators to define Python logic that runs inline within the proxy to inspect or filter LLM inputs and outputs. The root cause is CWE-94 (Improper Control of Generation of Code - Code Injection): the production guardrail create and update API paths accepted Python code and executed it without applying the same sandboxing and validation enforced by the test endpoint, creating an asymmetric security posture. Since the LiteLLM proxy typically holds LLM provider API keys and other credentials as process environment variables, unsandboxed code execution in this context directly threatens secret confidentiality. The CVSS 4.0 vector includes AT:P, reflecting that a specific precondition - possession of guardrail management privileges - must be met before exploitation is possible.

Know when Litellm gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 2.1 LOW
CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
vuln.today AI 4.7 MEDIUM

PR:H reflects mandatory guardrail admin privilege; AV:N for API exposure; limited C/I/A impact confined to proxy process secrets.

3.1 AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L
4.0 AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
High
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Jul 08, 2026 - 21:04 EUVD

DescriptionCVE.org

LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format. Prior to 1.82.0-stable, LiteLLM's Custom Code Guardrails production create and update paths did not apply the same sandboxing and validation used by the test endpoint, allowing a privileged user with access to create or update guardrails to submit custom Python code that executed in the LiteLLM proxy environment and could expose secrets available to the process. This issue is fixed in version 1.82.0-stable.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 5 pypi packages depend on litellm (4 direct, 1 indirect)

Ecosystem-wide dependent count for version 1.82.0.

Threat Intelligence Overview

EPSS Score
0.3%
Top 79% exploitable
Prevalence
Low
specialized AI gateway tool, primarily adopted by ML-focused teams
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

10
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

CVE-2026-42271 HIGH POC
8.7 May 08

Remote command execution in LiteLLM proxy server versions 1.74.2 through 1.83.6 allows any authenticated user to execute

CVE-2026-42208 CRITICAL POC
9.3 May 08

SQL injection in LiteLLM proxy server versions 1.81.16 through 1.83.6 allows unauthenticated remote attackers to read an

CVE-2026-59822 HIGH POC
8.8 Jul 08

Authentication bypass in LiteLLM (BerriAI) proxy/AI Gateway before 1.84.0 lets a remote unauthenticated attacker reach M

CVE-2024-2952 CRITICAL POC
9.8 Apr 10

BerriAI/litellm is vulnerable to Server-Side Template Injection (SSTI) via the `/completions` endpoint. Rated critical s

CVE-2026-40217 HIGH POC
8.8 Apr 10

Remote code execution in BerriAI LiteLLM (all versions through 2026-04-08) enables authenticated attackers to execute ar

CVE-2024-4888 HIGH POC
8.1 Jun 06

BerriAI's litellm, in its latest version, is vulnerable to arbitrary file deletion due to improper input validation on t

CVE-2026-93355 HIGH POC
7.6 Sep 28

Authentication bypass in the LiteLLM proxy lets any party who already holds a valid JWT issued by the configured externa

CVE-2025-0330 HIGH POC
7.5 Mar 20

In berriai/litellm version v1.52.1, an issue in proxy_server.py causes the leakage of Langfuse API keys when an error oc

CVE-2024-9606 HIGH POC
7.5 Mar 20

In berriai/litellm before version 1.44.12, the `litellm/litellm_core_utils/litellm_logging.py` file contains a vulnerabi

CVE-2024-6587 HIGH POC
7.5 Sep 13

A Server-Side Request Forgery (SSRF) vulnerability exists in berriai/litellm version 1.38.10. Rated high severity (CVSS

CVE-2024-5225 HIGH POC
7.2 Jun 06

An SQL Injection vulnerability exists in the berriai/litellm repository, specifically within the `/global/spend/logs` en

CVE-2024-4889 HIGH POC
7.2 Jun 06

A code injection vulnerability exists in the berriai/litellm application, version 1.34.6, due to the use of unvalidated

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy