A LiteLLM vulnerability, CVE-2026-40217, is now on CISA’s list of flaws used in real attacks. Google’s threat intelligence team says attackers used it to turn limited AI keys into full admin access, then ran up AI bills on victims’ accounts. The fix is LiteLLM 1.83.10, according to the GitLab advisory database. CISA’s deadline for federal agencies is December 2, 2026, according to The Hacker News.
LiteLLM is an open-source proxy that sits between your apps and AI providers such as OpenAI, Anthropic and Google. Agencies and small IT teams use it to give staff and tools one endpoint, with per-user keys and spending limits. That makes it a target. Whoever controls the proxy controls every provider key behind it. This post covers what the flaw is, who is exposed, what attackers did, and how to lock the proxy down. Facts are as of November 22, 2026.
The short version: if you run LiteLLM, update to 1.83.10 or later today. Block the /guardrails/test_custom_code endpoint at your reverse proxy. Keep the admin interface off the internet. Treat the master key like a root password. Then check your provider bills and key usage for the past few months.
What the LiteLLM vulnerability is
The flaw sits in a testing feature for custom guardrails. LiteLLM lets admins write Python checks that screen AI requests and responses. The POST /guardrails/test_custom_code endpoint runs that code in a sandbox to test it.
The sandbox can be escaped. The GitLab advisory says user-supplied Python runs in a hand-rolled sandbox that can be broken with bytecode-level tricks. That gives an attacker code execution in the proxy process. GitLab also notes the proxy runs as root in the default Docker image, so the attacker gets the whole container.
The CVE record’s description is short. It says LiteLLM "allows remote attackers to execute arbitrary code via bytecode rewriting at the /guardrails/test_custom_code URI," as shown on OSV.
Versions and scores:
| Item | Detail | Source |
|---|---|---|
| Affected | 1.81.8 up to, not including, 1.83.10 | GitLab advisory |
| Fixed | 1.83.10 and later | GitLab advisory |
| Severity | 8.8 High (CVSS 3.1); 8.7 (CVSS 4.0) | GitLab; X41 D-Sec |
| Found by | X41 D-Sec, published April 8, 2026 | X41 advisory |
This is not new. X41 D-Sec reported it to LiteLLM in February and published its advisory in April. What is new is proof that attackers are using it.
Who can reach the LiteLLM vulnerability
This is where sources differ, and it matters for your risk.
The GitLab advisory says, "Reaching the endpoint requires a proxy-admin credential in default configurations." X41’s advisory says the endpoint needs authentication with the master key, and its proof of concept uses that key.
Google’s report describes the attack differently. It says a threat actor used the flaw to "elevate limited-access inference keys (‘Virtual Keys’) into full administrative credentials." Virtual keys are the per-user or per-app keys LiteLLM hands out.
We could not resolve that gap from public sources. Some setups may expose the endpoint to more than the master key, or attackers may have obtained admin access another way first. Either way, the safe response is the same. Patch, and do not rely on key limits alone to protect the proxy.
What attackers did with the LiteLLM vulnerability
Google Threat Intelligence Group described the attacks in its November 16 AI threat report. The goal was LLMjacking: stealing access to AI services and making the victim pay for it.
According to Google’s report:
- Escalation. The actor used CVE-2026-40217 to turn limited keys into admin credentials. Google says privileged service accounts were enough to stay in "without the use of malware."
- Abuse. Attackers turned on AI services, including by "subscribing compromised accounts to pay-as-you-go agreements." One actor created and deleted short-lived service accounts to get around rate limits.
- Reselling. Some set up API gateways and relays to sell access to the victim’s AI resources. Google says illicit storefronts it calls "LLM Mixers" advertised tokens at $0.10 to $25 per million.
- Cost. Across LLMjacking cases in 2026, Google says single-day fraudulent charges exceeded $100,000 in some cases. The worst cases reached $1 million in total.
That last point is why this matters to small teams. A stolen proxy is a stolen credit card for every AI provider behind it.
How to fix the LiteLLM vulnerability and lock down the proxy
Start with the patch, then reduce what the proxy exposes. The steps below draw on X41’s workarounds and the GitLab advisory.
-
Update to 1.83.10 or later. If you run the Docker image, pull a fixed tag and redeploy. Check the version after the restart.
-
Block the endpoint. X41 suggests denying
/guardrails/test_custom_codeat your reverse proxy. In nginx, alocationblock withdeny allreturns 403. Keep it blocked even after patching unless you use custom guardrails. -
Restrict the admin API. X41 says the master key should be known only to trusted administrators, not to app owners or API users.
-
Get the admin UI off the internet. Put it behind a VPN or firewall rule.
-
Stop running as root. X41 recommends running the container with a non-root
--userto limit what an attacker can do.
Check for signs of abuse
If your proxy was reachable from the internet before you patched, look back over the past few months:
- Provider bills. Look for spikes at OpenAI, Anthropic, Google, AWS Bedrock or Azure OpenAI that do not match your usage.
- New keys and accounts. Check LiteLLM for keys, users or teams you did not create, and your cloud accounts for new service accounts.
- Spend limits. Confirm per-key budgets are still set and were not raised.
- Logs. Search proxy logs for requests to
/guardrails/test_custom_code.
If you find anything, rotate every provider key stored in LiteLLM, plus the master key. Then set hard spending caps at each provider, as covered in AI API spending limits.
Who should worry about the LiteLLM vulnerability
You may run LiteLLM without knowing it. A developer or contractor may have set it up for one project, and nobody has looked at it since. Ask three questions:
- Do we run a LiteLLM proxy? Check servers, containers and cloud services for an image named
litellmor a service on port 4000, its usual default. - Did a vendor or contractor set one up? Ask whoever built your chatbot, search tool or internal AI assistant what sits between it and the AI provider.
- Is it reachable from the internet? A proxy behind a VPN is far less exposed than one with a public URL.
If the answer to the first two is no, this LiteLLM vulnerability is not your problem. If you are not sure, find out this week.
A pattern in AI gateways
This is the second LiteLLM flaw in CISA’s Known Exploited Vulnerabilities catalog this fall. In September we covered an MCP authentication flaw in LiteLLM that failed open. Last week we wrote about exposed AI gateway API keys.
The lesson is consistent. An AI gateway holds the keys to every model you pay for. Patch it like a firewall, keep its admin side private, and cap spending where the provider bills you.
Frequently Asked Questions
What is the LiteLLM vulnerability CVE-2026-40217?
It is a sandbox escape in LiteLLM’s custom guardrail test endpoint. Crafted Python code can break out of the sandbox and run in the proxy process, which runs as root in the default Docker image.
Which LiteLLM version fixes it?
The GitLab advisory lists 1.83.10 as the fix. Versions from 1.81.8 up to 1.83.10 are affected.
Is the LiteLLM vulnerability being exploited?
Yes. Google’s threat team says an actor used it to raise limited keys to admin credentials, and CISA added it to the Known Exploited Vulnerabilities catalog in November 2026.
Does an attacker need a login?
GitLab’s advisory says reaching the endpoint needs a proxy-admin credential in default setups. Google says attackers started from limited virtual keys. Patch regardless.
What is LLMjacking?
LLMjacking is stealing access to AI services so the victim pays for the usage. Google says some cases ran up more than $100,000 in a single day.
What is the CISA deadline?
Federal agencies must fix it by December 2, 2026, according to The Hacker News. Other organizations should treat that as a useful target too.
Can we block the endpoint instead of patching?
Blocking `/guardrails/test_custom_code` at your reverse proxy is a sound extra layer. Update to 1.83.10 as well, because other routes to the flaw may exist.
Should we rotate our provider keys?
If the proxy was reachable from the internet before you patched, yes. Rotate every provider key stored in LiteLLM and the master key, then set spending caps at each provider.