Your AI Gateway Is a Key Vault: What the Exploited LiteLLM Flaw (CVE-2026-40217) Means

Your AI Gateway Is a Key Vault: What the Exploited LiteLLM Flaw (CVE-2026-40217) Means

Last updated: November 20, 2026. We will update this post if the vendor advisory is corrected.

Direct answer: CVE-2026-40217 is a LiteLLM CVE that CISA added to its Known Exploited Vulnerabilities (KEV) catalog on November 18, 2026, citing evidence of active exploitation. It matters beyond LiteLLM because an AI gateway holds many teams' LLM keys in one place, so one bug in the gateway can expose all of them.

If you run LiteLLM, the short version is to check your version, patch, and rotate keys if you were exposed. This post covers what CISA, the vendor and Google say about this LiteLLM CVE, a vendor-neutral LLM gateway security checklist, and the other path to AI that a gateway never sees: your employees. dope.security can't protect a LiteLLM server, and we say where it fits and where it doesn't below. For a primer, see what an AI gateway is.

What do CISA, the vendor, and Google actually say about CVE-2026-40217?

Public sources disagree on several details, so we anchor each statement to a named source.

  • CISA lists it as "BerriAI LiteLLM Unprotected Alternate Channel Vulnerability," added November 18, 2026, based on evidence of active exploitation. CISA's alert gives no severity score or version. CISA says its binding directive applies only to federal civilian agencies, and encourages all organizations to prioritize KEV remediation.
  • The BerriAI advisory (GHSA-wxxx-gvqv-xp7p) calls it a "sandbox escape in custom-code guardrail." The POST /guardrails/test_custom_code endpoint runs user-supplied Python in a hand-rolled sandbox that can be escaped, allowing arbitrary code execution in the proxy process, which runs as root in the default Docker image. We link to the researchers' advisory, X41 D-Sec's X41-2026-001, rather than reproduce any technique.
  • The Hacker News reports the federal remediation date for this flaw as December 2, 2026.
  • Google Threat Intelligence Group's November 16 report says an actor used CVE-2026-40217 to elevate limited-access inference keys (virtual keys) into full administrative credentials as part of LLMjacking intrusions.

What's affected, and what's the workaround?

Per the BerriAI advisory, versions from 1.81.8 up to but not including 1.83.10 are affected. The advisory's header lists 1.83.10 as patched, but its patch text says "Fixed in 1.83.11" and to upgrade to 1.83.11 or later. Check the current advisory and move to the latest release. If you can't upgrade right away, the advisory's workaround is to block POST /guardrails/test_custom_code at your reverse proxy or API gateway.

What don't we know yet?

  • Severity. The scores differ by source. The Hacker News reports CVSS 8.8, while the BerriAI advisory shows Moderate 5.9 (CVSS v4) and the GitHub Advisory Database listing shows High. We don't state one score as fact. [UNCONFIRMED] which score is authoritative.
  • How attackers got access. The advisory says reaching the endpoint requires a proxy-admin credential in default configurations. Google describes escalation from limited keys to admin credentials. How the actor got there isn't public. [UNCONFIRMED]
  • Which exact release is the fix. The advisory says both 1.83.10 and 1.83.11.

Why is an AI gateway a key vault?

An AI gateway is a single point of failure for LLM access because it gathers provider keys, virtual keys, routing and spend controls from many teams into one service. If an attacker gets code execution in the gateway's proxy process, they may reach whatever that process can read.

That makes the gateway worth defending like a secrets store. Many teams use it because it is convenient: one endpoint, one place to set budgets. The same convenience concentrates risk. Anyone who wants to understand AI gateway security should start with that blast radius.

Where does LLMjacking come in?

LLMjacking, also written LLM jacking, is when attackers use stolen credentials to run models on someone else's account while the victim pays. Google Threat Intelligence Group and Mandiant describe attackers monetizing stolen LLM access by reselling it, and report that some organizations lost more than $100,000 in a single day. Those figures describe LLMjacking incidents in general, as Google and Mandiant reported them. They aren't tied to CVE-2026-40217 victims.

What belongs on an LLM gateway security checklist?

These steps secure the gateway itself. The first three come from the vendor advisory. The rest are general practice and not LiteLLM-specific.

  1. Patch. Upgrade to the current release rather than a specific old version (advisory).
  2. Block the endpoint if you can't patch. Block POST /guardrails/test_custom_code at the edge (advisory).
  3. Know the root default. The advisory says the proxy process runs as root in the default Docker image (advisory).
  4. Keep the admin API off the internet. Restrict who can reach it.
  5. Rotate keys. If you were exposed, rotate provider keys and virtual keys.
  6. Limit each key. Use least privilege and low budget caps.
  7. Alert on spend spikes. Unexpected usage is often the first sign of stolen access.
  8. Run as non-root where possible.

What's the other path to AI that your gateway never sees?

A gateway only governs traffic sent through it. Employees open ChatGPT, Claude, Gemini and Copilot in a browser, on a managed laptop, and none of that crosses your gateway.

That is why gateway hygiene is half the job. The other half is policy over how people reach AI services outside the sanctioned path. If you're sorting out where gateways and endpoint controls each fit, read AI firewall vs. AI gateway vs. endpoint AI governance. To find unsanctioned use, start with what shadow AI is and how to detect it, then set an AI usage policy. A written shadow AI policy only works if something enforces it.

How does dope.security fit, and where doesn't it?

dope.SWG is an endpoint secure web gateway for managed Mac and Windows devices. It governs outbound web requests from those endpoints. For example, admins can allow, warn on, or block a specific domain, such as an unapproved AI gateway host or a known-bad domain, with a custom category rule. They can also apply Cloud App Controls and Dopamine DLP to supported AI apps.

Specifically:

  • AI visibility distinguishes personal accounts from enterprise-licensed ones. Cloud App Controls can restrict supported apps like ChatGPT and Claude to enterprise accounts, can allow or block Gemini, and support a warn mode for Gemini and Copilot.
  • Dopamine DLP monitors or blocks sensitive data (PII, PCI, PHI, IP) sent to a documented list of AI apps, including ChatGPT, Claude, Gemini, Copilot (browser), Perplexity (browser), NotebookLM and Abacus AI (browser), with Monitor and Block modes only.
  • On managed Mac and Windows endpoints, SIEM logs record the process name and process call tree (the parent-child chain, with command arguments), along with hostname, URL, policy type and block detail.

What dope.security doesn't do: it does not sit in front of or protect self-hosted LiteLLM servers, Linux hosts, CI/CD runners or cloud workloads, and it does not inspect CLI or non-browser traffic for leaked API keys or secrets. Developer package registries such as PyPI and npm are on the default bypass list, so don't read this as inspection of developer package traffic. The gateway layer needs its own controls.

What should you do this week?

  • Confirm whether you run LiteLLM, and which version.
  • Patch, or block the endpoint at the edge.
  • Rotate provider and virtual keys if there's any chance of exposure.
  • Review spend for anything unusual.
  • Inventory unsanctioned AI use on managed laptops.
  • Write or tighten your AI usage policy.

To see how dope.security governs AI on managed laptops, start a free trial or book a demo.

Frequently asked questions

What is CVE-2026-40217?

CVE-2026-40217 is a vulnerability in BerriAI's LiteLLM that CISA lists as an "Unprotected Alternate Channel Vulnerability." The vendor advisory describes a sandbox escape in the custom-code guardrail endpoint that allows arbitrary code execution in the proxy process.

Is CVE-2026-40217 being actively exploited?

CISA added it to the KEV catalog on November 18, 2026, based on evidence of active exploitation. Google Threat Intelligence Group reported an actor using it in LLMjacking intrusions. The Hacker News reports a December 2, 2026 federal remediation date.

Which LiteLLM versions are affected, and how do I fix it?

Per the BerriAI advisory, versions from 1.81.8 up to but not including 1.83.10 are affected. The advisory cites both 1.83.10 and 1.83.11 as the fix, so upgrade to the latest release and check the current advisory. If you can't upgrade, block POST /guardrails/test_custom_code at your reverse proxy or API gateway.

Does exploiting CVE-2026-40217 require authentication?

Per the vendor advisory, reaching the endpoint requires a proxy-admin credential in default configurations. Google reports an actor used the flaw to escalate limited-access keys to administrative credentials, and how that happened isn't public.

What is LLMjacking?

LLMjacking is when attackers use stolen credentials or API keys to run large language models on someone else's account, so the victim pays the bill. Attackers may also resell the access.

Why is an AI gateway a security risk?

An AI gateway holds provider keys, virtual keys and routing for many teams, so one compromise can expose all of them. It also only governs traffic sent through it, so employees using AI apps directly in a browser fall outside it. See AI firewall vs. AI gateway vs. endpoint AI governance.

Sources: CISA alert, Nov 18, 2026; BerriAI advisory; X41 D-Sec; The Hacker News; Google Threat Intelligence Group. For related reading, see AI supply chain security.

Questions? Contact sales@dope.security.

Data Loss Prevention
Data Loss Prevention
Endpoint Security
Endpoint Security
Secure Web Gateway
Secure Web Gateway
← back to blog Home