What happened
A sandbox escape in LiteLLM's Custom Code Guardrail feature allows an attacker with limited-access LiteLLM "Virtual Keys" to break out of the guardrail sandbox and gain administrative privileges on the LiteLLM proxy. GTIG/Mandiant documented active exploitation: a threat cluster escalated to LiteLLM admin using pre-acquired virtual keys, supporting LLMjacking campaigns that resell stolen model access (one victim billed nearly $1M for 500k+ calls). Reaffirmed in Google's 2026-11-16 GTIG AI Threat Tracker.
Why it matters
LiteLLM is one of the most widely deployed LLM gateways/proxies for routing model traffic and enforcing per-key quotas. A sandbox escape that turns a low-privilege virtual key into an admin account defeats the gateway's authorization boundary and feeds the credential-resale economy, letting attackers mint higher-quota keys and run up bills. This is a concrete AI-infrastructure exploit with confirmed in-the-wild use, not merely a catalogued CVE.
Attack vector
Guarded custom code run inside the LiteLLM guardrail sandbox escapes the sandbox boundary, letting an attacker holding limited virtual keys escalate to admin and mint/expand inference keys
Affected systems
LiteLLM (versions with Custom Code Guardrail sandbox; full fix set bundled in a later 1.x release per GTIG)
Mitigation
Upgrade LiteLLM to a version containing the full CVE-2026-40217 fix set; rotate virtual keys; restrict guardrail code to least-privilege; monitor for unexpected key creation / usage spikes