AI Wiki · Mediocre Security
IncidentIncidents

LiteLLM guardrail sandbox escape (CVE-2026-40217)

A sandbox escape in LiteLLM's custom-code guardrail test endpoint that gives code execution in the LLM gateway; disclosed May 2026 and added to CISA's Known Exploited Vulnerabilities catalog on Nov 18 2026.

What happened

LiteLLM’s proxy exposes POST /guardrails/test_custom_code, which runs administrator-supplied Python to test custom guardrails. The GitHub advisory published May 7 2026 says that code ran in a hand-rolled sandbox that could be escaped with bytecode-level techniques, giving arbitrary code execution in the proxy process, which runs as root in the default Docker image. In default configurations the endpoint needs a proxy-admin credential, one reason the advisory rates it only Moderate. The fix replaced the sandbox with RestrictedPython; the advisory’s version table says 1.83.10 fixes it, while its text names 1.83.11. Blocking the endpoint at a reverse proxy is the stated workaround.

On Nov 18 2026 CISA added CVE-2026-40217 to its Known Exploited Vulnerabilities catalog, meaning it has evidence of exploitation in the wild, and gave federal agencies until Dec 2 to patch. CISA did not say who exploited it or how.

Why it matters

LiteLLM sits in front of model providers and holds their API keys. Exposed instances are already targets: the PoeLLM cryptominer infected mostly internet-facing LiteLLM and Ollama servers, and ARTEX agents exploited other AI tools to steal provider keys. Like GPUStack earlier in November, it is an AI-serving tool in the KEV catalog; no source we found says AI was used to find or exploit it.

Timeline

Every dated event in the wiki that involves LiteLLM guardrail sandbox escape (CVE-2026-40217), newest first.

Connections

LiteLLM guardrail sandbox escape (CVE-2026-40217) and everything one link away. Drag to move, scroll to zoom, click a node to open it.Open in the full graph →

What links here

Concept AI and CVEs: latent flaws, now exploitable

Product LiteLLM

Sources

  1. GitHub, “Sandbox escape in custom-code guardrail (GHSA-wxxx-gvqv-xp7p)”, May 7 2026
  2. CISA, “Known Exploited Vulnerabilities Catalog (JSON feed)”, Nov 18 2026