On November 18, 2026, CISA added CVE-2026-40217 to its Known Exploited Vulnerabilities catalog. The bug is in LiteLLM, the open-source proxy many AI products put in front of OpenAI, Anthropic, Bedrock and Gemini so they can switch models, track spend and hand out virtual keys. CISA lists it because there is evidence of exploitation, not because it is new: the fix shipped in April.
If your team self-hosts the LiteLLM proxy, this is a short check. The proxy usually holds every provider API key you own, so code execution on it is a key-theft problem, not just a server problem.
LiteLLM has an endpoint, POST /guardrails/test_custom_code, that runs Python you submit so you can try out a custom guardrail. It ran that code in a home-made sandbox. According to the GitHub advisory GHSA-wxxx-gvqv-xp7p, the sandbox "can be escaped using bytecode-level techniques", which gives arbitrary code execution inside the proxy process. The advisory notes the proxy runs as root in the default Docker image.
Verified, from the advisory:
litellm 1.81.8 up to but not including 1.83.10.POST /guardrails/test_custom_code at your reverse proxy or gateway.
CISA's entry gives US federal agencies until December 2, 2026 to apply mitigations. That deadline does not bind private companies, but it is a useful signal of priority.
A bug that needs an admin key sounds low risk. Two things change that.
Attackers guess admin keys. Zenity Labs reported in June that its honeypots logged 569 POST requests to this exact endpoint between April 15 and May 24, 2026. The requests cycled through 47 guessed master keys such as sk-1234, sk-admin and sk-changeme, then tried payloads that dumped environment variables and ran shell commands. If your master key was ever left at an example value, assume someone has tried it.
It chains with other LiteLLM bugs. Obsidian Security described a chain in which a normal internal_user key can raise itself to proxy_admin (CVE-2026-47101 and CVE-2026-47102) and then use this sandbox escape. Their write-up says the complete fix set for all three is in v1.83.14-stable. Separately, Wiz reported an MCP authentication bypass, CVE-2026-59822, fixed in v1.84.0, which CISA added to the same catalog on September 2.
So the real question is not only "is our admin key secret" but "which version are we on, and who can reach the proxy".
pip show litellm in any Python service. Staging and "temporary" demo proxies count.POST /guardrails unless you actually manage guardrails through them.LITELLM_MASTER_KEY and confirm no example value survives in any environment./guardrails/test_custom_code and /guardrails from addresses you do not recognise, and for bursts of 401s with different bearer values (key guessing).os.environ, subprocess, gi_code, f_builtins, or names like __globals__ assembled from string fragments.litellm_settings.callbacks in config.yaml. Obsidian notes that callbacks do not appear in the admin UI. Remove anything you did not add.proxy_admin and confirm each one.
If any of these turn up something odd, rotate every provider key, database password and MCP token the proxy could read, then rebuild the container from a clean image rather than cleaning it in place.
If you run a LiteLLM proxy, steps 1 to 5 above fit in an afternoon and tell you whether this was ever exposed. If the review shows one shared gateway holding every provider key with a public admin page, that is an architecture question about how your AI features reach models, and the [AI SaaS development](https://somanathkhadanga.com/services/ai-saas-development) service covers it. Bring your LiteLLM version, how the proxy is deployed, and who currently holds admin access.
*Originally published at [somanathkhadanga.com](https://somanathkhadanga.com/blog/litellm-cve-2026-40217-exploited-guardrail-rce).*