Security advisory · CVE-2026-40217 · verified 2026-11-24
LiteLLM CVE-2026-40217: the guardrail test sandbox can be escaped
Short version: if your LiteLLM proxy runs version 1.81.8 through 1.83.9, upgrade to 1.83.11 or later now. CISA added this flaw to its Known Exploited Vulnerabilities catalog on November 18, 2026 — that listing means CISA has evidence it is being exploited. The federal remediation deadline is December 2, 2026.
Check your version
Enter the LiteLLM version your proxy actually runs (for example, the output of pip show litellm). The verdict is computed only from what you type here, against the affected and fixed ranges in the vendor advisory.
Honest scope: ModelMinder does not scan, probe, or connect to your LiteLLM deployment — we have no way to see it, and this page never tries. This checker judges only the version string you enter. A “fixed” verdict covers this one CVE, not the security of your whole gateway setup.
What the flaw is
LiteLLM lets an administrator test a custom guardrail — a small Python filter — before saving it. CISA's KEV entry describes CVE-2026-40217 as an unprotected alternate channel vulnerability (CWE-420) that “could allow remote attackers to execute arbitrary code via bytecode rewriting at the /guardrails/test_custom_code URI.”
The vendor advisory (BerriAI, GHSA-wxxx-gvqv-xp7p) explains the mechanism at the class level: the test endpoint “runs user-supplied Python inside a hand-rolled sandbox. The sandbox can be escaped using bytecode-level techniques, allowing arbitrary code execution in the proxy process — which runs as root in the default Docker image.” The fix replaced the hand-rolled sandbox with RestrictedPython.
Two facts that shape the real risk, both from the vendor advisory:
- An admin credential is the gate. “Reaching the endpoint requires a proxy-admin credential in default configurations.” Who holds your proxy's admin/master key is therefore part of this vulnerability's blast radius.
- The proxy holds your provider keys. A LiteLLM gateway stores the OpenAI, Anthropic, and other provider keys it routes to. Code execution inside that process puts those keys within reach — which is why the checklist below treats key exposure seriously.
One wrinkle worth knowing: the advisory's structured data lists 1.83.10 as the first patched version and links the v1.83.10-stable release, while its text says “Fixed in 1.83.11.” Our checker reports 1.83.10 as “patched code, upgrade anyway” rather than silently picking one reading. Going to 1.83.11 or later satisfies both.
Configuration exposure checklist
Five checks, each drawn from a named fact in the CISA KEV entry or the vendor advisory. Tick what is true for your deployment; the page tallies your open exposures instantly, in your browser — your answers are not sent anywhere.
Basis: Vendor advisory GHSA-wxxx-gvqv-xp7p: 'Fixed in 1.83.11… Upgrade to 1.83.11 or later.'
Open exposure: Versions 1.81.8–1.83.9 carry the escapable hand-rolled sandbox.
Basis: Vendor advisory workaround, verbatim in substance: block the endpoint at your reverse proxy or API gateway if upgrading is not immediately possible.
Open exposure: That endpoint is the vulnerable surface named by both CISA KEV and the vendor advisory.
Basis: Vendor advisory: 'Reaching the endpoint requires a proxy-admin credential in default configurations.'
Open exposure: An admin credential is the key that reaches the vulnerable endpoint — an over-shared or example/default admin key removes that barrier.
Basis: Vendor advisory impact: escaped code executes 'in the proxy process — which runs as root in the default Docker image.'
Open exposure: On the default image, a sandbox escape is code execution as root inside the container that holds your provider keys.
Basis: Consequence of the verified impact: arbitrary code execution in the proxy process (vendor advisory) on the gateway that stores provider keys; CISA lists the CVE as known-exploited (KEV, added 2026-11-18).
Open exposure: Code execution inside the gateway process puts every provider key it stores within reach — rotation is the safe assumption after exposure.
Answer the checklist to see your exposure count.
If you can't upgrade today
- Block the endpoint. The vendor advisory's stated workaround: block
POST /guardrails/test_custom_codeat your reverse proxy or API gateway. - Audit admin credentials. List every holder of a proxy-admin credential or the master key; remove example, default, or stale keys.
- Plan the upgrade. Move to 1.83.11 or later (a current release is better still) and restart the proxy.
- Track the gateway like a model dependency. Your LLM gateway is part of your AI stack's risk surface. ModelMinder watches model retirements and AI-stack risk signals so the next deadline doesn't arrive unannounced — track your models free.
Sources
- CISA Known Exploited Vulnerabilities Catalog — CVE-2026-40217
- CISA alert, 2026-11-18: CISA Adds Four Known Exploited Vulnerabilities to Catalog
- BerriAI LiteLLM security advisory GHSA-wxxx-gvqv-xp7p
- NVD record for CVE-2026-40217 (linked from the KEV entry)
Facts on this page were verified against the CISA KEV catalog entry (date added 2026-11-18; federal remediation due date 2026-12-02) and the BerriAI vendor advisory on 2026-11-24. Severity as listed by CISA/NVD for this CVE: High. KEV known ransomware campaign use: Unknown. If any fact here goes stale, tell us at [email protected] and we will correct it.