Most teams put LiteLLM in front of their model providers for a boring reason. One endpoint, one bill, one place to set rate limits. The side effect is that the proxy ends up holding the OpenAI key, the Anthropic key, the Bedrock role and the database password all at once. That makes CVE-2026-40217 a bigger problem than its vendor rating suggests.
CISA added the flaw to its Known Exploited Vulnerabilities catalog on 18 November, in a batch of four that also included Synology and Apache Axis bugs, according to The Hacker News. Federal agencies have until 2 December. Everyone else should treat that date as theirs too.
What is actually broken
LiteLLM lets admins write custom guardrails in Python and try them out through POST /guardrails/test_custom_code. That code ran inside a home-made sandbox. As the project's advisory explains, the sandbox could be escaped with bytecode tricks, which gives arbitrary code execution inside the proxy process. In the default Docker image that process runs as root.
The catch, and the reason BerriAI rates it Moderate (CVSS 4.0 5.9) while NVD says 8.8, is that you need a proxy admin credential. On paper that is a high bar. In practice it often is not.
Why "needs an admin key" is weaker than it sounds
LiteLLM's setup guide uses sk-1234 as the example master key. Plenty of people copied it. When Wiz scanned the internet in February it found 3,074 exposed gateways; 294 accepted sk-1234 and 191 had no master key set at all, as reported in September. A separate advisory notes that without a configured master key, callers could be treated as admins.
So the realistic attack is not a clever chain. It is a script that tries a default key, then posts a guardrail that runs a shell. Honeypot data cited by Rescana from Zenity Labs counted 569 requests to the vulnerable endpoint between mid April and late May, each guessing a master key. Proof of concept code has been public since May. We have not been able to check the Zenity numbers against the original report, so take the exact count loosely, but the pattern is plain enough.
The version number trap
Affected versions run from 1.81.8 up to, but not including, 1.83.10. The advisory metadata says 1.83.10 is patched. The advisory text says to upgrade to 1.83.11 or later, where the old sandbox was replaced with RestrictedPython. When metadata and prose disagree, follow the prose. Wiz goes further and recommends 1.84.0 or later, which also covers related bugs found since.
One more thing on versions. Do not "upgrade" to 1.107.0. A malicious build with that number was pushed to PyPI on 21 October and pulled. We covered that incident in our piece on the LiteLLM 1.107.0 compromise. If your dependency bot opened a PR for it, close it and check whether it was ever installed.
Was it really used for LLMjacking?
Google's Threat Intelligence Group described attackers raising limited inference keys to full admin on LiteLLM gateways and setting up persistence, as part of a wider LLMjacking campaign against finance, retail, transport and tech firms. That reporting is the main reason this landed in KEV. Some researchers argue the key escalation step was a different bug fixed in 1.84.0, not this CVE. For an operator the argument does not change much. Both paths end at someone else running up your model bill, or reading your prompts, and 1.84.0 closes both.
What to do this week
- Upgrade. 1.83.11 is the floor. 1.84.0 or later is better.
- If you cannot upgrade today, block
POST /guardrails/test_custom_codeat your ingress, API gateway or reverse proxy. Nobody needs it in production. - Replace the master key if it is
sk-1234, empty, or anything a person could guess. Check whether you also set a salt key before rotating, since that affects stored credentials. - Look for guardrails you did not write. An attacker who got in would leave one behind for persistence.
- Search logs for calls to the test endpoint going back to mid April.
- If you find anything, restart the proxy and rotate every provider key, the master key and the database credentials. Assume all of them were read.
The bigger lesson for AI platform teams
An AI gateway is a credential vault with an HTTP API in front of it. It deserves the same treatment as Vault or your CI system: no default secrets, no public exposure of admin routes, tight egress, and the narrowest cloud role you can get away with. Many teams stood these proxies up in a hurry during a pilot and never revisited them. If yours is one of them, this is the week to fix it. The same thinking applies to long-lived credentials in general: the fewer places a key can be read from, the less any single bug costs you.







