LiteLLM Flaw CVE-2026-40217 Is Being Exploited in LLMjacking Attacks: Who Is Affected and How to Patch
CISA added LiteLLM flaw CVE-2026-40217 to its exploited list. Affected versions, why it matters for LLMjacking, and how to patch and rotate keys.
Table of contents
The US Cybersecurity and Infrastructure Security Agency (CISA) has added CVE-2026-40217, a code-execution flaw in the open-source LLM gateway LiteLLM, to its Known Exploited Vulnerabilities (KEV) catalog. If you run the LiteLLM proxy on any version from 1.81.8 up to (but not including) 1.83.10, upgrade to 1.83.11 or later and treat the secrets it holds — provider API keys, the master key and database credentials — as potentially exposed. Google's threat intelligence team has tied exploitation of the flaw to LLMjacking, where attackers hijack paid AI model access.
What happened
On November 18, 2026, CISA added four vulnerabilities to the KEV catalog, meaning it has evidence they are being exploited in the wild. Alongside LiteLLM, the batch included flaws in Apache Axis 1.x, Vanderbilt REDCap and Synology DiskStation Manager (more on those below).
The LiteLLM bug itself is not new. The CVE was published in April 2026, and LiteLLM's security advisory followed. What changed this week is official confirmation that attackers are using it — and many self-hosted gateways are never updated once they work.
Federal civilian agencies have until December 2, 2026 to remediate, according to the KEV data. Everyone else should treat that date as a ceiling, not a target.
How CVE-2026-40217 works
LiteLLM is a popular Python library and proxy server that puts one OpenAI-compatible API in front of many model providers, with features such as virtual keys, spend tracking and guardrails. One guardrail type lets administrators write custom Python checks, and the proxy exposes an endpoint, POST /guardrails/test_custom_code, to try that code out.
According to LiteLLM's advisory, the endpoint ran user-supplied code inside a hand-rolled sandbox that could be escaped. Once out, the code runs inside the proxy process — which, in the default Docker image, runs as root. Security firm Ostorlab notes that the old sandbox filtered program text but could not reliably constrain runtime behaviour, and that the fix replaces it with RestrictedPython.
Sources disagree on several details, so here is what each one says:
| Item | LiteLLM advisory | CVE record (via NVD / GitLab) |
|---|---|---|
| Affected | 1.81.8 to before 1.83.10 | 1.81.8 to before 1.83.10 |
| Fixed | Patch notes: 1.83.11 (version field: 1.83.10) | 1.83.10 |
| Severity | Moderate, CVSS 4.0 score 5.9 | High, CVSS 3.1 score 8.8 |
| Weakness | CWE-913 | CWE-420 |
| Precondition | Proxy-admin credential (default config) | Low-privileged network attacker |
Go with the advisory's patch notes and run 1.83.11 or later. The severity gap mostly comes down to how each scorer weighs the admin-credential requirement.
The LLMjacking connection: what is confirmed and what is not
Confirmed by CISA: CVE-2026-40217 is listed as known exploited, with ransomware use marked unknown. CISA has not published victim counts or attribution.
Confirmed by Google: two Google Threat Intelligence Group (GTIG) reports name CVE-2026-40217 in LLMjacking intrusions. A November 16 report lists it under privilege escalation and persistence, describing limited-access inference keys ("Virtual Keys") being elevated to full administrative credentials. The intrusions GTIG examined hit financial services, retail, transportation and technology organisations in North America, South America and Asia Pacific.
A November 2 GTIG report found fraudulent charges above $100,000 in a single day in some incidents, with cumulative charges reaching about $1 million at some organisations before access was revoked. It also describes grey-market services that resell stolen model access.
Not consistent: Google's account does not match LiteLLM's. The advisory describes code execution that already requires an admin credential, while GTIG describes ordinary Virtual Keys being escalated to admin. GTIG's two reports also differ from each other: the November 16 report calls it a sandbox escape, while the November 2 report describes a user-ID rebind in the /key/regenerate endpoint. KernelBrief could not resolve this from public sources, and the attack may involve more than one weakness. The practical takeaway: do not assume a non-admin key is harmless on an unpatched gateway.
Who is affected
- Teams self-hosting the LiteLLM proxy (Docker, Kubernetes or
litellm --config) on 1.81.8 through 1.83.9 — and, given the conflicting fix information, anyone still on 1.83.10. - Platforms that expose the proxy's admin API or UI to the internet, or share keys widely across teams or CI jobs.
- Indirectly, any organisation whose OpenAI, Anthropic, Google, Azure or AWS model credentials are stored in a vulnerable gateway — those keys are what attackers monetise.
If you only use the litellm Python SDK inside your own application and never run the proxy server, you are not exposing this endpoint, but upgrading is still sensible.
What to do now
1. Check your version
# Python install
pip show litellm | grep -i version
# Running container
docker exec <litellm-container> pip show litellm | grep -i version
2. Upgrade
# Inside a virtual environment
python -m pip install --upgrade "litellm[proxy]>=1.83.11"
For containers, pin an explicit release tag at or above 1.83.11 rather than relying on a floating tag, then recreate the container (docker compose up -d --force-recreate) so the old process is actually replaced. If your Python setup is messy, our guide to virtual environments covers clean, isolated installs.
3. Block the endpoint if you cannot patch today
LiteLLM's suggested workaround is to block the test endpoint at your reverse proxy until you upgrade. For nginx:
location = /guardrails/test_custom_code {
return 403;
}
This only prevents new exploitation through that endpoint; it does nothing for a gateway that was already compromised.
4. Assume compromise if you were exposed
- Search access logs for
POST /guardrails/test_custom_codeand unexpected/key/regeneraterequests. - Rotate the LiteLLM master key, all virtual/admin keys, database credentials and every upstream provider API key stored in the proxy.
- Review provider billing dashboards and usage logs for unusual spikes, new models or unfamiliar regions.
- Check the host for unexpected processes, cron jobs or SSH keys, especially if the container ran as root.
5. Reduce the blast radius
Keep the admin UI and management API off the public internet, give admin keys to as few people and systems as possible, run the container as a non-root user, and set spend limits with each model provider. Paid model access is now worth stealing — the economics we covered in our Gemini 4 Neon pricing breakdown apply to attackers' margins too.
The other three flaws CISA added
- CVE-2026-90436 — Apache Axis 1.x (CVSS 9.8): unauthenticated remote code execution. Axis 1 is end-of-life with no official fixed release; the recommended path is migrating to Axis2/Java. Reported exploitation involves cryptocurrency miners.
- CVE-2026-90817 — Vanderbilt REDCap (CVSS 9.8): unauthenticated code injection that requires a valid public survey hash. Patched REDCap releases are available; check the vendor advisory for your branch.
- CVE-2024-10441 — Synology DSM (CVSS 9.8): an unauthenticated RCE first shown at Pwn2Own 2024 and patched in December 2024. Synology warned of attacks in late October; some reporting links it to ransomware, though CISA's entry marks ransomware use as unknown.
For these three, CISA set a shorter federal deadline of November 21, 2026. The batch arrived a day after CISA flagged another piece of infrastructure tooling, the Puppet Server flaw CVE-2026-115731.
The bottom line
CVE-2026-40217 is a reminder that AI gateways are now high-value infrastructure: they hold the keys to expensive model APIs, and attackers have a market for that access. Upgrade LiteLLM to 1.83.11 or later, block the guardrail test endpoint until you do, and rotate every credential the proxy could read if it was ever exposed.
Updated November 20, 2026, 09:30 IST: Corrected the severity and weakness details to show the differing ratings from LiteLLM's advisory and the CVE record; set the fixed version to 1.83.11 per LiteLLM's patch notes; replaced secondary attribution with Google's own reports and noted where their description differs from LiteLLM's; removed an unverified researcher credit.
Frequently asked questions
+Which LiteLLM versions are affected by CVE-2026-40217?
LiteLLM's advisory lists 1.81.8 up to, but not including, 1.83.10. Its version field names 1.83.10 as patched, but its own patch notes say the fix is in 1.83.11, so upgrade to 1.83.11 or later.
+Can an unauthenticated attacker exploit CVE-2026-40217?
Not according to LiteLLM, whose advisory says the vulnerable endpoint needs a proxy-admin credential in default configurations. Google's threat researchers describe attackers escalating ordinary keys to admin, so do not assume a non-admin key is harmless: patch and rotate keys either way.
+What is LLMjacking?
LLMjacking is the theft and abuse of someone else's access to large language model APIs. Attackers use stolen keys or compromised gateways to run or resell model usage while the victim pays the bill.
+Is blocking the /guardrails/test_custom_code endpoint enough?
It is the workaround LiteLLM suggests if you cannot upgrade immediately, but it does not repair a proxy that was already compromised. Upgrade, then rotate every secret the proxy could read.
Sources & references
- CISA — CISA Adds Four Known Exploited Vulnerabilities to Catalog (Nov 18, 2026)
- CISA KEV data (cisagov/kev-data) — Add Updated KEV Files for 2026-11-18
- LiteLLM (GitHub Security Advisory) — Sandbox escape in custom-code guardrail (GHSA-wxxx-gvqv-xp7p)
- Google Threat Intelligence Group — Agentic threat activity crosses a significant threshold (Nov 16, 2026)
- Google Threat Intelligence Group — LLMjacking: monetizing compromised cloud models (Nov 2, 2026)
- GitLab Advisory Database — CVE-2026-40217: LiteLLM has a sandbox escape in custom-code guardrail
- NVD — CVE-2026-40217
- The Hacker News — CISA Warns of 4 Exploited Flaws Linked to Ransomware, Cryptomining, and LLMjacking Attacks (Nov 19, 2026)
- Ostorlab — LiteLLM Guardrail Sandbox Escape RCE (CVE-2026-40217) (Nov 19, 2026)
Spotted an error? See our Corrections Policy.
- #litellm
- #cve
- #llmjacking
- #ai-security
- #cisa-kev
- #vulnerability
- #python
The KernelBrief editorial desk researches, writes and fact-checks every article published on this site. Every article is checked against primary sources (official documentation, vendor announcements, standards bodies and original research) before publication. Every factual claim is linked to its source, and corrections are handled under our published Corrections Policy.
Related articles
VMware vCenter Zero-Day CVE-2026-123890 Was Exploited for Months: Who Is Affected and How to Patch
VMSA-2026-0009 fixes vCenter auth bypass CVE-2026-123890, exploited since September per Mandiant. Fixed builds, no workaround, and what to check.
· 6 min read
Puppet Server Flaw CVE-2026-115731 Is Being Exploited: Who Is Affected and How to Patch
CISA says critical Puppet flaw CVE-2026-115731 (CVSS 9.4) is being exploited. Affected Puppet and OpenVox versions, fixes, and interim mitigations.
· 5 min read
F5 BIG-IP Buffer Overflow Flaws: Six Critical CVEs, Who Is Affected and How to Patch
F5 disclosed six critical BIG-IP stack buffer overflows (CVSS 9.8) that crash TMM without login. Affected versions, risky configs and hotfixes.
· 4 min read