Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain or compromise guardrail admin credentials
-
DeliveryCraft malicious Python payload targeting process environment
-
ExploitSubmit payload via production guardrail create/update API
-
ExecutionCode executes unsandboxed in proxy process
-
ImpactHarvest 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
PR:H reflects mandatory guardrail admin privilege; AV:N for API exposure; limited C/I/A impact confined to proxy process secrets.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.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- 5 pypi packages depend on litellm (4 direct, 1 indirect)
Ecosystem-wide dependent count for version 1.82.0.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
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.
Remote command execution in LiteLLM proxy server versions 1.74.2 through 1.83.6 allows any authenticated user to execute
SQL injection in LiteLLM proxy server versions 1.81.16 through 1.83.6 allows unauthenticated remote attackers to read an
Authentication bypass in LiteLLM (BerriAI) proxy/AI Gateway before 1.84.0 lets a remote unauthenticated attacker reach M
BerriAI/litellm is vulnerable to Server-Side Template Injection (SSTI) via the `/completions` endpoint. Rated critical s
Remote code execution in BerriAI LiteLLM (all versions through 2026-04-08) enables authenticated attackers to execute ar
BerriAI's litellm, in its latest version, is vulnerable to arbitrary file deletion due to improper input validation on t
Authentication bypass in the LiteLLM proxy lets any party who already holds a valid JWT issued by the configured externa
In berriai/litellm version v1.52.1, an issue in proxy_server.py causes the leakage of Langfuse API keys when an error oc
In berriai/litellm before version 1.44.12, the `litellm/litellm_core_utils/litellm_logging.py` file contains a vulnerabi
A Server-Side Request Forgery (SSRF) vulnerability exists in berriai/litellm version 1.38.10. Rated high severity (CVSS
An SQL Injection vulnerability exists in the berriai/litellm repository, specifically within the `/global/spend/logs` en
A code injection vulnerability exists in the berriai/litellm application, version 1.34.6, due to the use of unvalidated
EUVD-2026-42350
GHSA-72m8-9m7m-h278
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB