CVE-2026-59821 Details
Description
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.
A vulnerability in LiteLLM versions prior to 1.82.0-stable allows privileged users to bypass sandboxing and validation in the Custom Code Guardrails production endpoints. This flaw enables the execution of arbitrary Python code in the LiteLLM proxy environment, potentially exposing sensitive information. The issue arises because the production endpoints did not apply the same safety checks as the test endpoint, creating a loophole for unauthorized code execution.
Users are advised to upgrade to LiteLLM version 1.82.0-stable or later. If an immediate upgrade is not possible, access to the production endpoints should be restricted to trusted administrators, the LITELLM_MASTER_KEY should be configured, and Custom Code Guardrails should not be enabled for untrusted users.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 9, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/BerriAI/litellm/commit/e50b4486d0f7aa0497185a1ebcdd2c91f1769eba | [email protected] | Patch |
| https://github.com/BerriAI/litellm/releases/tag/v1.82.0-stable | [email protected] | ProductRelease Notes |
| https://github.com/BerriAI/litellm/security/advisories/GHSA-72m8-9m7m-h278 | [email protected] | MitigationPatchVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| litellm litellm | < 1.82.0 1.82.0 nightly |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 13, 2026 | Initial Analysis | [email protected] |
| Jul 9, 2026 | CVE Modified | CISA-ADP |
| Jul 8, 2026 | New CVE Received | [email protected] |