CVE-2026-59821
JSON

2.1low

LiteLLM: Custom Code Guardrails production endpoints bypass code safety checks

Severity
2.1low CVSS:4.0 by GitHub_M
Exploit likelihood
0.73% (higher than 55% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-72m8-9m7m-h278PYSEC-2026-3478

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.

Affected

Product or packageVersionsReported by
BerriAI litellm< 1.82.0-stableCVE List
litellm (PyPI)before 1.82.0GitHub Advisory Database, PyPA Advisory Database
litellm litellmbefore 1.82.0, 1.82.0NVD

All scores

GitHub_M2.1low CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
GitHublow CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
NVD7.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N

Classification

CWE-94

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
Impact

LiteLLM's Custom Code Guardrails production create/update paths did not apply the same sandboxing and validation used by the test endpoint.

A privileged user with access to create or update guardrails could submit custom Python code that executed in the LiteLLM proxy environment. In deployments without a configured master key, callers could be treated as proxy administrators, making this reachable without intended administrative authorization.

This could allow arbitrary code execution in the LiteLLM proxy container and exposure of secrets available to the process.

Patches

The issue is fixed in 1.82.0-stable.

LiteLLM recommend upgrading to 1.82.0-stable or later.

Workarounds

If upgrading is not immediately possible:

  1. Restrict access to POST /guardrails and PUT /guardrails/{guardrail_id} to trusted administrators only.
  2. Ensure LITELLM_MASTER_KEY is configured.
  3. Avoid enabling Custom Code Guardrails for untrusted users.
NVD (es)

LiteLLM es un servidor proxy (Pasarela de IA) para llamar a las API de LLM en formato OpenAI (o nativo). Antes de la versión 1.82.0-stable, las rutas de creación y actualización de producción de las barreras de seguridad de código personalizado de LiteLLM no aplicaban el mismo sandboxing y validación utilizados por el punto final de prueba, lo que permitía a un usuario privilegiado con acceso para crear o actualizar barreras de seguridad enviar código Python personalizado que se ejecutaba en el entorno proxy de LiteLLM y podía exponer secretos disponibles para el proceso. Este problema está solucionado en la versión 1.82.0-stable.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-59821 changed 2026-07-09CVE Terms of Use
GitHub Advisory DatabaseGHSA-72m8-9m7m-h278 changed 2026-09-10CC-BY-4.0
NVDCVE-2026-59821 changed 2026-10-25Public domain
PyPA Advisory DatabasePYSEC-2026-3478 changed 2026-07-23CC-BY-4.0