LiteLLM’s custom guardrail test endpoint ran operator-supplied Python in a weak sandbox. Attackers escaped it with bytecode rewriting, and CISA lists the issue as known exploited.
Who is affected
Operators running BerriAI LiteLLM with custom-code guardrails, especially versions before 1.83.10/1.83.11 and default Docker images that run as root
Why it matters
CVE-2026-40217 — BerriAI LiteLLM contains an unprotected alternate channel vulnerability that could allow remote attackers to execute arbitrary code via bytecode rewriting at the /guardrails/test_custom_code URI.
- Default Docker deployments run the proxy as root, so a sandbox escape is full host compromise.
- Related privilege-escalation bugs can turn lower-privilege access into proxy_admin before this RCE is used.
Recommended action
- Upgrade to LiteLLM 1.83.11 or later (and consider 1.83.14-stable if you need the broader Obsidian chain fixes).
- Block
POST /guardrails/test_custom_codeuntil the upgrade is complete. - Rotate credentials and review audit logs if the endpoint was exposed.