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.
Published: 2026-07-08
Score: 2.1 Low
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

LiteLLM is an AI gateway that proxies Custom Code Guardrails feature in production does not enforce the sandboxing applied to the test endpoint. This allows a user with permission to create or update guardrails to submit arbitrary Python code that runs in the LiteLLM process. The vulnerability is a code injection flaw (CWE‑94). With execution, an attacker can read or exfiltrate secrets, environment variables, or other data available to the host process. Though the CVSS score is 2.1, indicating limited technical scope, the impact is high for anyone who can gain privileged guardrail configuration access.

Affected Systems

BerriAI's LiteLLM installations running any version prior to 1.82.0-stable, where the custom code guardrails production create and update paths did not enforce sandboxing and validation, are affected. Versions 1.82.0-stable and later have fixed the issue.

Risk and Exploitability

The EPSS score of < 1 % indicates a very low probability of exploitation in the wild. The CVSS score of 2.1 indicates limited technical scope and a low impact for systems that are not privileged. The vulnerability is not listed in CISA KEV. Attackers must first acquire privileged access to the guardrail configuration—typically through an insider or compromised administrative credential—before injecting and executing malicious code. Without such privilege, the flaw cannot be triggered remotely from the external network.

Generated by OpenCVE AI on July 26, 2026 at 17:22 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade LiteLLM to version 1.82.0‑stable or later where guardrail sandbox enforcement has been restored.
  • Restrict guardrail create and update permissions to only trusted administrators, disabling the upload of custom Python code when it is not required.
  • Remove or disable the Custom Code Guardrails feature entirely if it is not needed logs code execution or changes to guardrail configurations and investigate promptly.

Generated by OpenCVE AI on July 26, 2026 at 17:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-72m8-9m7m-h278 LiteLLM: Custom Code Guardrails production endpoints bypass code safety checks
History

Fri, 10 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H'}

threat_severity

Important


Thu, 09 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 08 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Berriai
Berriai litellm
Vendors & Products Berriai
Berriai litellm

Wed, 08 Jul 2026 19:45:00 +0000

Type Values Removed Values Added
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.
Title LiteLLM: Custom Code Guardrails production endpoints bypass code safety checks
Weaknesses CWE-94
References
Metrics cvssV4_0

{'score': 2.1, 'vector': '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-09T14:38:09.991Z

Reserved: 2026-07-07T15:00:50.978Z

Link: CVE-2026-59821

cve-icon Vulnrichment

Updated: 2026-07-09T14:38:07.032Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Important

Publid Date: 2026-07-08T19:14:13Z

Links: CVE-2026-59821 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-26T17:30:17Z

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')