Rook 0.8.7 + Pawn 0.1.0 surpassed top-tier agents in Claude Code for security. read more

LiteLLM custom-code guardrail sandbox escape exploited

Critical
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 lets attackers escape the /guardrails/test_custom_code sandbox via bytecode rewriting and execute code in the proxy process. CISA KEV; actively exploited. CVSS up to 8.8 High.
Recommended action
Upgrade LiteLLM to 1.83.11 or later (prefer a release that also covers related privilege-escalation chains). Until patched, block POST /guardrails/test_custom_code at your reverse proxy.

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.
  1. Upgrade to LiteLLM 1.83.11 or later (and consider 1.83.14-stable if you need the broader Obsidian chain fixes).
  2. Block POST /guardrails/test_custom_code until the upgrade is complete.
  3. Rotate credentials and review audit logs if the endpoint was exposed.

Source

GitHub advisory