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.

What Happened

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:

  • Affected: litellm 1.81.8 up to but not including 1.83.10.
  • Patched: the metadata says 1.83.10; the advisory text says the RestrictedPython sandbox that replaces the old one landed in 1.83.11. Treat 1.83.11 as the floor for this CVE.
  • Severity: High, CVSS 4.0 score 7.5. Exploitation needs a proxy-admin credential in default configurations.
  • Workaround if you cannot upgrade: block 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.

Why "Admin Only" Is Not Much Comfort

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".

Who Is Affected

  • You self-host the LiteLLM proxy (Docker, Kubernetes, a VM) on a version below 1.83.11. You are in scope for this CVE. Below 1.84.0, you are also exposed to the September KEV entry.
  • Your proxy's admin UI or API is reachable from the internet. This is the case the honeypot data describes. Exposure is much lower if only your backend can reach it on a private network, but upgrade anyway.
  • You use LiteLLM only as a Python SDK inside your app, with no proxy server. The vulnerable endpoint belongs to the proxy. The advisory is filed against the litellm package as a whole, so update it, but the attack path above does not apply in the same way.
  • You call OpenAI, Anthropic, Bedrock or Gemini directly without LiteLLM. Not affected by this CVE.

What to Do Today

  1. Find every proxy. Check deployment manifests, Helm values and Dockerfiles for litellm images, and run pip show litellm in any Python service. Staging and "temporary" demo proxies count.
  2. Upgrade to a current release. The LiteLLM releases page listed 1.108.11 (LTS) and 1.110.1 as the newest on November 19. Anything at or above 1.84.0 clears the fixes named in this brief; a current LTS build is the simpler choice. Test your config in staging first, since you may be jumping many minor versions.
  3. Block the test endpoint at the edge. Even after upgrading, deny external POST /guardrails/test_custom_code and POST /guardrails unless you actually manage guardrails through them.
  4. Take the admin surface off the internet. Put the admin UI and management routes behind a VPN, an identity-aware proxy or an IP allowlist. Your application only needs the model routes.
  5. Replace the master key. Set a long random LITELLM_MASTER_KEY and confirm no example value survives in any environment.
  6. Run as non-root. Use a non-root user in your container, and give the proxy's cloud role only what it needs, so code execution does not turn into account access.

How to Check Whether You Were Hit

  • Access logs: search for requests to /guardrails/test_custom_code and /guardrails from addresses you do not recognise, and for bursts of 401s with different bearer values (key guessing).
  • Payload hints Zenity describes: request bodies containing os.environ, subprocess, gi_code, f_builtins, or names like __globals__ assembled from string fragments.
  • Guardrails and callbacks: list every custom code guardrail on the proxy and every entry under litellm_settings.callbacks in config.yaml. Obsidian notes that callbacks do not appear in the admin UI. Remove anything you did not add.
  • Users and roles: list accounts with proxy_admin and confirm each one.
  • Provider dashboards: look at OpenAI, Anthropic, Bedrock and Gemini usage for spend or models you do not recognise.

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.

What to Watch Next

  • Exploitation details. CISA does not say who is exploiting the bug or since when. Public reporting so far is the April–May honeypot activity. Treat newer campaign details as unconfirmed until a primary source publishes them.
  • More LiteLLM advisories. This is the second LiteLLM entry in the catalog in three months. Subscribe to the repository's security advisories if you run the proxy.
  • Design limits. Obsidian also points out that stdio MCP servers configured by a proxy_admin can still run code by design. That is not a CVE, but it is another reason to treat proxy_admin as host-level access.

Related Reading

Next Step

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 service covers it. Bring your LiteLLM version, how the proxy is deployed, and who currently holds admin access.

Originally published at somanathkhadanga.com.