LiteLLM CVE-2026-40217 in CISA KEV: patch your AI gateway by 2 December 2026

CVE-2026-40217 lets a LiteLLM admin key run code on the proxy. CISA wants it fixed by 2 Dec 2026. Upgrade, block the endpoint, rotate keys.

Read time
16 min
Word count
2.6K
Sections
12
FAQs
8
Share
Two security engineers review a patch plan at a desk beside a server rack, with LiteLLM, CVE-2026-40217 and CISA KEV labels
On this page · 12 sections
  1. What CISA added on 18 November 2026
  2. What the vulnerability is
  3. A separate problem from the 1.107.0 release
  4. Scores and exploitation status
  5. Which versions are affected and which fix it
  6. The other LiteLLM entries in the KEV catalogue
  7. What BOD 26-04 requires, and who it binds
  8. A 72-hour response plan
  9. Isolate the gateway, not just the bug
  10. Notes for Indian teams and vendors
  11. How eCorpIT can help
  12. References

Summary. On 18 November 2026 CISA added CVE-2026-40217, a code execution flaw in the LiteLLM proxy, to its Known Exploited Vulnerabilities (KEV) catalogue on evidence of active exploitation, with a due date of 2 December 2026, 11 days from today. The /guardrails/test_custom_code endpoint ran caller-supplied Python in a hand-built sandbox that bytecode tricks could escape, so code ran in the proxy process, as root in the default Docker image. The NVD record carries a CVSS 3.1 score of 8.8 (High), and CISA's assessment of 19 November marks exploitation as active and the impact as total. LiteLLM's advisory lists 1.81.8 up to but not including 1.83.10 as vulnerable, yet its text names 1.83.11 as the fix, so treat 1.83.11 as the floor for this flaw and 1.84.0 as the floor for all four LiteLLM KEV entries. The current release on 20 November 2026 is 1.110.2. The endpoint needs a proxy-admin credential in default setups, so the real exposure is any gateway whose master key has leaked. It is a separate flaw from the malicious 1.107.0 release of 21 October. Our verdict: move to a current signed release this week, block the endpoint either way, and rotate the master key if a gateway ran an affected build.

About this article. This is for platform, security and DevOps teams that run LiteLLM as a self-hosted gateway in front of model APIs, and for vendors who host one for clients. On 21 November 2026 we checked the KEV entry and feed, the CISA alert, NVD, the LiteLLM, GitHub, X41 and Red Hat advisories, PyPI, LiteLLM's documentation and incident reports, and CISA's BOD 26-04 with its implementation guidance. We give no exploit detail beyond what the advisories publish. This is general information, not legal or security advice for your environment, and no vendor paid for inclusion. Researched with AI assistance and checked against the primary sources listed in the references.

What CISA added on 18 November 2026

CISA's alert of 18 November added four vulnerabilities to the KEV catalogue, all on evidence of active exploitation: flaws in Synology DiskStation Manager, Apache Axis and REDCap, plus the LiteLLM entry. The catalogue calls the LiteLLM entry an unprotected alternate channel vulnerability (CWE-420) and describes remote code execution through bytecode rewriting at the /guardrails/test_custom_code URI.

Field KEV entry for CVE-2026-40217
Vendor and product BerriAI LiteLLM
Date added 18 November 2026
Due date 2 December 2026
Known ransomware use Unknown
Forensic triage required No
Required action Apply vendor mitigations under BOD 26-04, or stop using the product if none exist
Weakness CWE-420, unprotected alternate channel

The fields above come from CISA's KEV data feed, catalogue version 2026.11.20. The other three entries added that day were due on 21 November, three days after listing, while LiteLLM has 14 days.

BOD 26-04 sets each deadline from four inputs: public exposure, KEV status, whether exploitation can be automated, and partial or total control. CISA's assessment on the NVD record marks this flaw as not automatable with total impact. Under the directive's timeline table, that combination gives 14 days on an asset that is not publicly exposed, but three days plus a forensic triage on one that is. CISA says it sets the KEV due date from the exposure data it holds, and that each agency makes the final exposure call asset by asset. So 2 December is the date for an internal gateway. For a federal agency, an internet-facing LiteLLM admin endpoint was due by 21 November.

What the vulnerability is

LiteLLM lets administrators write custom guardrails: small Python-like functions that inspect or rewrite requests and responses. Its documentation says this code runs in a restricted environment with no imports, no file access and no exec() or eval(). The test endpoint lets an admin try such a function before saving it.

In affected versions those limits were enforced by a hand-built sandbox, and bytecode-level techniques could get past it. Out of the sandbox, the code runs with the full rights of the proxy process. LiteLLM's fix replaced the sandbox with RestrictedPython. X41 D-Sec, which found the issue, rated it High, confirmed that code ran as root in the default Docker image, and published on 8 April 2026, when a coordinated embargo ended with no vendor patch yet available. We do not reproduce the technique here.

Three points shape the real risk:

  • It needs a credential. LiteLLM says reaching the endpoint requires a proxy-admin credential in default configurations. X41 describes an authenticated API request using the master key.
  • The master key is that credential. LiteLLM's production guide calls it the proxy admin credential: it authenticates admin API calls and is the Admin UI login password.
  • The proxy holds the keys to everything else. A gateway stores or forwards provider API keys, virtual keys and often database credentials, all readable by code running as root inside it.

A separate problem from the 1.107.0 release

CVE-2026-40217 is a code flaw disclosed in April 2026. It is not the supply-chain attack of 21 October 2026, when LiteLLM's hijacked release pipeline published a malicious 1.107.0 to PyPI, live from 11:39 to 13:23 UTC, and pointed the v1.107.0, latest, main-latest and main-stable Docker tags at a compromised image from 11:46 to 14:20 UTC. That release has no CVE; the OSV database tracks it as MAL-2026-2144, together with malicious 1.82.7 and 1.82.8 uploads from March 2026. Our guide to the backdoored 1.107.0 release covers the indicators and clean-up for that incident.

One lesson carries across. LiteLLM's root-cause report says the October attack began with an administrative key to an internal LiteLLM Agent Platform deployment, committed to a public repository in May and never revoked. An admin-only flaw is only as safe as the admin keys behind it.

Scores and exploitation status

Scores differ by source; use the one your policy names.

Source Score or rating What it says
NVD record (CVSS 3.1, from MITRE and Red Hat) 8.8, High Network attack, low complexity, low privileges, high impact on confidentiality, integrity and availability
GitHub-reviewed advisory (CVSS 4.0) 7.5, High High complexity, high privileges, high impact on the proxy
LiteLLM repository advisory (CVSS 4.0) 5.9, Medium High privileges, low confidentiality and integrity impact, high availability impact
X41 D-Sec advisory (CVSS 4.0) 8.7, High Low privileges, authenticated API request
Red Hat Important Admin credentials required, which keeps it below Critical
CISA SSVC on NVD, 19 November 2026 Active, not automatable, total impact Basis for the KEV timeline

These values come from the NVD record, the two GitHub advisory records, the X41 advisory and Red Hat's CVE page. The GitHub advisory database also showed an EPSS probability of about 69%, in the 99th percentile, when we checked on 21 November 2026.

The maintainers' Medium rating assumes the admin credential is hard to get. CISA's listing shows the flaw is being exploited anyway. Treat it as High.

Which versions are affected and which fix it

The GitHub advisory gives the vulnerable range for the litellm Python package as 1.81.8 up to, but not including, 1.83.10, and marks 1.83.10 as patched. Its text, however, says the fix shipped in 1.83.11 and tells users to upgrade to 1.83.11 or later, while linking the v1.83.10-stable release as the patched build. The safe reading is 1.83.11 as the minimum.

Version or build Released Status for CVE-2026-40217
Before 1.81.8 Before 5 February 2026 Outside the range; still exposed to other LiteLLM KEV entries
1.81.8 to 1.83.9 5 February to 17 April 2026 Vulnerable
1.82.7 and 1.82.8 March 2026 Malicious uploads, since removed from PyPI; never run
1.83.10 19 April 2026 Marked patched in the range; the advisory text names 1.83.11
1.83.11 22 April 2026 Fixed, per the advisory text
1.84.0 14 May 2026 Also fixes CVE-2026-59822, the last of the four KEV entries
1.107.0 21 October 2026 Malicious build from a hijacked pipeline; never run
1.110.2 20 November 2026 Current release on PyPI and GitHub

Release dates come from PyPI and GitHub, the malicious versions from OSV and LiteLLM's incident report. The NVD description, written from X41's report, covers LiteLLM through 8 April 2026; NVD's configuration data uses the 1.81.8 to 1.83.10 range.

Two more groups need a check. Red Hat has shipped fixed images for Ansible Automation Platform 2.6 (RHSA-2026:24866, 9 June 2026) and OpenShift AI 3.3 (RHSA-2026:30056, 25 June 2026), and lists Lightspeed Core as not affected; apply its errata rather than patching inside its images. And any internal image that pinned LiteLLM between February and April 2026 is in range even if your main gateway is current.

The other LiteLLM entries in the KEV catalogue

This is the fourth LiteLLM entry in the KEV catalogue, and all four were added in 2026. If you are patching anyway, close all four.

CVE Added to KEV Due Fixed in Flaw, per CISA
CVE-2026-42208 8 May 2026 11 May 2026 1.83.7 SQL injection that can expose the proxy database and the credentials it manages
CVE-2026-42271 8 June 2026 22 June 2026 1.83.7 Command injection by any authenticated user, including low-privilege internal keys
CVE-2026-59822 2 September 2026 16 September 2026 1.84.0 Improper authentication on the MCP Streamable HTTP endpoint
CVE-2026-40217 18 November 2026 2 December 2026 1.83.11 Guardrail sandbox escape to code execution, admin credential needed

Dates and descriptions come from CISA's KEV data feed, and fixed versions from the GitHub advisories. The pattern matters. CVE-2026-40217 needs an admin key, and the SQL injection entry describes a route to the credentials the proxy manages. LiteLLM has also disclosed a host-header flaw that could, under specific conditions, give unauthenticated access to protected management routes, fixed in 1.84.0, and an Enterprise-only file read that could leak the master key, fixed in 1.103.10, 1.104.8, 1.105.6 and 1.106.5. We have seen no public report of attackers chaining these with CVE-2026-40217, but treat a gateway that sat unpatched through May as one whose keys may be known.

What BOD 26-04 requires, and who it binds

BOD 26-04, issued on 10 June 2026, replaced BOD 22-01 and BOD 19-02 as the directive behind KEV deadlines. It binds Federal Civilian Executive Branch agencies. It does not apply to contractors unless their procurement contract says so, but agencies must review contracts and work with cloud providers so that systems run on their behalf meet the same timelines.

Days are calendar days, and timelines move as facts change: taking a system off the internet is a valid mitigation that changes its exposure and pushes the next required action back. CISA's alert encourages every organisation, not only federal agencies, to prioritise KEV entries. For everyone outside the federal civilian estate and its contracts, the due date is a strong priority signal with no legal force.

A 72-hour response plan

Day 1: find every gateway and cut off the endpoint

  1. Inventory. List every LiteLLM deployment: production, staging, laptops, notebook servers, CI images and anything bundled in another product. Record each version and image digest.
  1. Block the endpoint now. LiteLLM's documented workaround is to block POST /guardrails/test_custom_code at your reverse proxy or API gateway. Keep the block on patched builds too.
  1. Take the admin surface off the internet. Under BOD 26-04, removing public exposure is itself a mitigation. Put the Admin UI and admin API behind a VPN, private network or identity-aware proxy.

A rule like this at an NGINX edge works as a stopgap; adapt it to your proxy and confirm the path returns 403:


            location /guardrails/test_custom_code {
    return 403;
}
          

Day 2: upgrade to a current signed release

  1. Pick the target. 1.84.0 clears all four KEV entries, but later critical advisories, including a proxy-admin privilege escalation fixed in the 1.100 to 1.103 lines, make a current release the only sensible target. On 20 November 2026 the latest release was 1.110.2.
  1. Pin and verify. LiteLLM says to pin an exact version or image digest rather than latest, and to verify the image signature before deploying. It rotated its signing key on 23 October 2026, and releases since 15 November, including 1.110.2, use keyless cosign signing. The compromised 1.107.0 images carried a valid signature from the old key, so check digests too.
  1. Avoid the malicious builds. Check lock files, pip caches and registries for 1.107.0, 1.82.7 and 1.82.8.
  1. Check the runtime user. LiteLLM says its consolidated image runs as UID 65532 but older published images can run as root, and gives a docker image inspect check. A non-root process limits what an escaped payload can touch.

Day 3: rotate keys and look for signs of compromise

  1. Rotate the master key if any deployment ran an affected build while reachable by anyone you do not fully trust. LiteLLM's guide has two paths. With LITELLM_SALT_KEY set, the master key is only an auth credential: set a new value and restart every instance, and do not use the POST /key/regenerate call for it before v1.112.0, which LiteLLM warns can leave stored credentials unreadable. Without a salt key, the master key also encrypts stored credentials and needs the re-encryption flow. Back up the database before either.
  1. Rotate provider keys stored in the proxy database or its environment: OpenAI, Anthropic, Google, Azure and any others. Code running as root could have read them.
  1. Check logs for calls to the guardrail test endpoint, new admin users, unfamiliar virtual keys and unexplained provider spend, often the first visible sign of a stolen key.
  1. Harden admin access. Keep proxy admins few, give applications scoped virtual keys rather than the master key, and give each administrator a named account or SSO. LiteLLM's disable_env_credential_login setting then stops the shared environment-variable login to the Admin UI.

Isolate the gateway, not just the bug

An AI gateway is a credential vault with an HTTP front end. Four LiteLLM KEV entries between May and November 2026, plus two malicious releases, say the threat model should assume another flaw will arrive. The lasting controls are architectural:

  • Keep the gateway on a private network, reachable only from the applications that call it.
  • Allow admin traffic only from a management network.
  • Store provider keys in a secrets manager rather than the gateway database where you can.
  • Give each workload its own virtual key with a budget, so one stolen key cannot drain every account.
  • Subscribe to LiteLLM's advisories and CISA's KEV feed, and patch the gateway on the same cycle as your edge devices.

If you are choosing between gateways, the security record belongs in the scorecard alongside cost and latency; our AI gateway comparison of LiteLLM, Cloudflare, Kong and Bifrost covers the other options. The same logic applies to agent tooling, which our MCP server hardening guide covers, and to the guardrail layer itself, which runs code on every request.

Notes for Indian teams and vendors

LiteLLM's repository had about 63,600 GitHub stars and 13,400 forks on 21 November 2026, a sign of how widely product teams and service providers use it to route several model vendors through one gateway. Two points apply in particular.

  • US federal work. If you operate a gateway for a US federal customer, check whether your contract pulls BOD 26-04 timelines in; agencies must review contracts for it.
  • Personal data. If prompts or logs passing through the gateway hold customer personal data, a proxy compromise is a possible personal data breach. Handle it under your incident response plan and India's data protection law, and take legal advice on notification.

How eCorpIT can help

eCorpIT is a Gurugram-based technology organisation, founded in 2021, assessed at CMMI Level 5 and MSME certified, with senior-led engineering teams working across AWS, Microsoft and Google platforms. Our cybersecurity services team can inventory your LiteLLM deployments, move them to a pinned and signed release, take the admin plane off the internet and rotate the keys behind them before 2 December. Talk to us at /contact-us/.

Last updated: 21 November 2026.

References

  1. CISA adds four known exploited vulnerabilities to catalog, 18 November 2026 — Cybersecurity and Infrastructure Security Agency
  1. Known Exploited Vulnerabilities catalog data feed, version 2026.11.20 — Cybersecurity and Infrastructure Security Agency
  1. LiteLLM has a sandbox escape in custom-code guardrail, GHSA-wxxx-gvqv-xp7p — GitHub Advisory Database
  1. Advisory X41-2026-001: Guardrail sandbox escape in LiteLLM, 8 April 2026 — X41 D-Sec
  1. CVE-2026-40217 detail — National Vulnerability Database, NIST
  1. LiteLLM MCP authentication bypass via OAuth2 passthrough fallback, GHSA-7488-6r32-c95q — GitHub Advisory Database
  1. litellm release history — Python Package Index
  1. Release v1.110.2, 20 November 2026 — BerriAI LiteLLM on GitHub
  1. BOD 26-04: Prioritizing security updates based on risk, 10 June 2026 — Cybersecurity and Infrastructure Security Agency
  1. BOD 26-04 implementation guidance: Prioritizing security updates based on risk — Cybersecurity and Infrastructure Security Agency
  1. Custom code guardrail — LiteLLM documentation
  1. Production best practices — LiteLLM documentation
  1. Oct 21, 2026 LiteLLM release v1.107.0 compromised — LiteLLM
  1. MAL-2026-2144: Malicious code in litellm (PyPI) — OSV
  1. The attack chain behind the v1.107.0 LiteLLM release, 23 October 2026 — LiteLLM
  1. Sandbox escape in custom-code guardrail, repository security advisory — BerriAI LiteLLM on GitHub
  1. CVE-2026-40217 — Red Hat Customer Portal
  1. Release v1.83.10-stable — BerriAI LiteLLM on GitHub
  1. LiteLLM has SQL injection in proxy API key verification, GHSA-r75f-5x8p-qvmc — GitHub Advisory Database
  1. LiteLLM: Authenticated command execution via MCP stdio test endpoints, GHSA-v4p8-mg3p-g94g — GitHub Advisory Database
  1. Authentication bypass via host header injection, GHSA-4xpc-pv4p-pm3w — GitHub Advisory Database
  1. Unauthenticated file read leaks master key on Enterprise proxy, GHSA-w4c7-34wj-hqm8 — BerriAI LiteLLM on GitHub
  1. Privilege escalation to proxy admin via cross-domain reuse of the salt key, GHSA-7hp6-4w63-5g45 — BerriAI LiteLLM on GitHub
  1. Security best practices — LiteLLM documentation
  1. Docker image security guide — LiteLLM documentation
  1. Rotating the master key — LiteLLM documentation
  1. BerriAI/litellm repository — GitHub

Frequently asked

Quick answers.

01 What is CVE-2026-40217?
It is a sandbox escape in the LiteLLM proxy's custom-code guardrail test endpoint. Submitted code could break out of the restricted environment and run with the proxy's full rights, root in the default Docker image. The NVD record scores it 8.8 High, and CISA lists it as actively exploited.
02 What is the CISA deadline for this LiteLLM flaw?
CISA added it to the Known Exploited Vulnerabilities catalogue on 18 November 2026 with a due date of 2 December 2026. Under BOD 26-04 that date covers systems that are not publicly exposed; an exposed federal system gets three days plus forensic triage. For other organisations it is a priority signal, not a legal obligation.
03 Which LiteLLM versions are vulnerable?
The advisory lists the litellm package from 1.81.8 up to, but not including, 1.83.10. Its text names 1.83.11 as the fix, so treat 1.83.11 as the minimum, and 1.84.0 as the minimum for all four LiteLLM KEV entries. Better still, move to the current release, 1.110.2 as of 20 November 2026.
04 Is CVE-2026-40217 the same as the malicious LiteLLM 1.107.0 release?
No. CVE-2026-40217 is a code flaw disclosed in April 2026 and fixed in the 1.83 line. The 1.107.0 release of 21 October 2026 was a supply-chain attack on LiteLLM's release pipeline and has no CVE. Check for both: upgrade for the flaw and hunt separately for the malicious build.
05 Can an attacker exploit it without a password or key?
In default configurations, no. The endpoint requires a proxy-admin credential, usually the master key. That stops casual attacks but not determined ones, because master keys leak through environment files, logs, public repositories and other vulnerabilities. CISA's listing shows attackers are exploiting it, so plan as if a key may be exposed.
06 What should I do if I cannot upgrade before 2 December?
Block POST requests to the guardrails test_custom_code path at your reverse proxy or API gateway, which is LiteLLM's documented workaround. Move the admin interface and admin API onto a management network and rotate the master key. Then schedule the upgrade as soon as testing allows.
07 Do I need to rotate my OpenAI, Anthropic and Google API keys?
If any gateway ran a vulnerable build while reachable by people you do not fully trust, yes. Code running as root in the proxy can read every provider key it holds. Rotate the master key, provider keys and database password, review virtual keys, then watch provider dashboards for unusual spend.
08 Does BOD 26-04 apply to private companies or Indian vendors?
Not directly. BOD 26-04 binds US federal civilian agencies and reaches contractors only when their procurement contract says so. Indian vendors hosting systems for US federal customers should check their contracts. Every other organisation can use the KEV due date as a sensible benchmark for how fast to patch an exploited flaw.

About the author

Manu Shukla

Founder & Director

Founder of eCorpIT. Hands-on engineer leading senior-only delivery for AI apps, custom software, and cloud systems for global clients.

Subscribe

One engineering note a week. No fluff, no spam.

Senior-architect playbooks on AI agents, mobile apps, cloud, security, data, and marketing — delivered every Wednesday.

Past the reading

Read enough. Let's build something.

A senior architect responds in 24 working hours with scope, indicative cost, and a timeline. NDA before any technical conversation.

Loading search…

Browse all guides