LiteLLM is the open-source gateway many teams put in front of OpenAI, Anthropic, Gemini, Bedrock and self-hosted models. It holds the provider API keys, hands out its own “virtual keys” to apps and users, and tracks spend. That makes it a valuable target. Compromise the gateway and you get every upstream key behind it.
On November 18, 2026, CISA added CVE-2026-40217 to its Known Exploited Vulnerabilities (KEV) catalog, alongside bugs in Synology DSM, Apache Axis and REDCap. The federal deadline for LiteLLM is December 2, 2026.
What CISA and the advisory describe
CISA’s entry calls it an “unprotected alternate channel” (CWE-420) that lets remote attackers run arbitrary code “via bytecode rewriting at the /guardrails/test_custom_code URI.” That matches LiteLLM’s GitHub advisory GHSA-wxxx-gvqv-xp7p:
POST /guardrails/test_custom_coderuns user-supplied Python inside a hand-rolled sandbox.- Bytecode-level techniques escape that sandbox, giving code execution in the proxy process. In the default Docker image, that process runs as root.
- In default configurations the endpoint needs a proxy-admin credential.
- The advisory lists versions >= 1.81.8 and < 1.83.10 as affected. Its patched-versions field says 1.83.10, while the text says the fix shipped in 1.83.11, where the sandbox was replaced with
RestrictedPython.
The Hacker News lists the flaw at CVSS 8.8.
What Google saw attackers doing
The exploitation evidence comes from a Google Threat Intelligence Group (GTIG) report on LLMjacking: stealing cloud and model access and then reselling or burning the quota. GTIG says the activity hit financial services, retail, transportation and technology organizations in North America, South America and Asia Pacific.
In one case, a follow-on cluster obtained pre-validated LiteLLM virtual keys from the group that had broken in. It then went after the victim’s LiteLLM gateway and, in GTIG’s words, “exploited a user ID rebind vulnerability in the /key/regenerate endpoint (CVE-2026-40217) to elevate standard Virtual Keys into full PROXY_ADMIN master administrative credentials.”
Elsewhere in the report, GTIG describes actors provisioning GPU instances across regions, requesting quota increases and pooling stolen keys behind open-source gateways (including their own LiteLLM instances) to resell access through so-called “LLM mixers.”
The mismatch, and why it matters less than it looks
So the same CVE ID points at two different endpoints depending on who you read. The public record (CISA, NVD and the GitHub advisory) describes the guardrail sandbox escape. GTIG describes a /key/regenerate privilege escalation. The two do chain together neatly: the rebind gets an attacker a proxy-admin key, and the guardrail endpoint needs exactly that to run code as root. But none of the sources we read say the attackers used that chain.
For defenders, the answer is the same either way. LiteLLM 1.84.0 (release notes dated November 19, 2026) lists “/key/regenerate ownership-rebind + premium-gate guards” and /key/update authorization checks under hardening, and it’s newer than the 1.83.11 sandbox fix.
What to do
- Upgrade to LiteLLM 1.84.0 or later. From 1.84.0, versions follow PEP 440, so the Docker tag is
litellm:1.84.0with no-stablesuffix. Update pinned tags in Helm values and Renovate rules. - If you can’t upgrade today, block
POST /guardrails/test_custom_codeat your reverse proxy or API gateway, as the advisory suggests. - Rotate credentials if the proxy was reachable from the internet or from untrusted networks: the master key, admin virtual keys and the upstream provider keys stored in the gateway.
- Hunt in your logs for calls to
/key/regenerate,/key/updateand/guardrails/test_custom_codefrom keys that shouldn’t be calling them, and for unexpected new admin keys. - Check provider billing and quota for the pattern GTIG describes: new API keys, new GPU instances in unusual regions, and quota-increase requests.
- Keep the admin surface private. The management API doesn’t need to be on the same public listener as
/chat/completions.