INCIDENT MAP

Browse / AI Framework and Platform Flaws / CVE-2026-59821

LiteLLM: Custom Code Guardrails production endpoints bypass code safety checks

CVE-2026-59821 ยท 2026-07-22 low

Class
AI Framework and Platform Flaws (filed by a model that read the advisory)
Technique
Code and command execution
Affected
litellm (PyPI)
Gets past
Sandbox or allowlist
CVSS
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
EPSS
0.9% chance of exploitation in 30 days

How it works, in short

Production create and update routes for custom guardrail code skip the sandbox used by the test endpoint, so submitted Python runs inside the proxy. (Our summary, written by a model. The source text is below.)

Details

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:

References

Source: GitHub Advisory Database, used under CC BY 4.0.