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 package | Versions | Reported by |
|---|---|---|
| BerriAI litellm | < 1.82.0-stable | CVE List |
| litellm (PyPI) | before 1.82.0 | GitHub Advisory Database, PyPA Advisory Database |
| litellm litellm | before 1.82.0, 1.82.0 | NVD |
All scores
| GitHub_M | 2.1low CVSS:4.0 | 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 |
| GitHub | low CVSS:4.0 | 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 |
| NVD | 7.2high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| PyPA Advisory Database | Not scored CVSS:4.0 | 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 |
Classification
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:
- Restrict access to
POST /guardrailsandPUT /guardrails/{guardrail_id}to trusted administrators only. - Ensure
LITELLM_MASTER_KEYis configured. - 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
| https://github.com/BerriAI/litellm/security/advisories/GHSA-72m8-9m7m-h278 | mitigation, patch, vendor-advisory, web | |
| https://github.com/BerriAI/litellm/commit/e50b4486d0f7aa0497185a1ebcdd2c91f1769eba | patch, web | |
| https://github.com/BerriAI/litellm/releases/tag/v1.82.0-stable | product, release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-59821 | advisory | |
| https://github.com/BerriAI/litellm | package | |
| https://pypi.org/project/litellm | package | |
| https://github.com/advisories/GHSA-72m8-9m7m-h278 | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-59821 changed 2026-07-09 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-72m8-9m7m-h278 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-59821 changed 2026-10-25 | Public domain |
| PyPA Advisory Database | PYSEC-2026-3478 changed 2026-07-23 | CC-BY-4.0 |