For: development and platform teams that run a LiteLLM proxy (AI gateway), and IT teams that look after in-house AI infrastructure. This article is based on BerriAI's advisory, the CVE record and CISA KEV; it does not cover attack steps.
続報待ち:この記事は公式発表に合わせて更新します
- Who is affected
development and platform teams that run a LiteLLM proxy (AI gateway), and IT teams that look after in-house AI infrastructure.
- Confirmed so farSee the table ↓
- The flaw
- Affected and fixed versions
- Exploitation
- Not yet confirmed
- How the attacks work and how far they reached (CISA shows exploitation via KEV and SSVC; no detail in official sources)
- Whether authentication is required (BerriAI says an admin credential is needed; the KEV text does not mention it)
- The inconsistent fixed-version number inside BerriAI's advisory (1.83.10 or 1.83.11; this site recommends 1.83.11 or later)
- What to do nowSee the steps ↓
- Check your LiteLLM version and whether you run the proxy
- Update to 1.83.11 or later (avoid 1.107.0)
- Block the endpoint upstream if you cannot update
2 more
- Narrow admin keys and check they have not leaked
- Look for signs of compromise
- Where to verify (source)All sources ↓
- BerriAI
- Last checked
- as of November 19, 2026
Follow-up plans and what we checked
CISA added the flaw to KEV on November 18; its SSVC entry lists Exploitation as active, Automatable no and Technical Impact total. The KEV description does not address whether authentication is required. BerriAI's advisory says an admin credential is needed.
What to do today
Check your LiteLLM version and whether you run the proxy
Using LiteLLM only as a library is different from running the proxy (server). This flaw concerns POST /guardrails/test_custom_code on the proxy. If the proxy is 1.81.8 up to but not including 1.83.10 (the advisory's affected range), it is affected. List Docker tags, pip versions and proxies other teams set up for testing (asset inventory checklist).
Update to 1.83.11 or later (avoid 1.107.0)
BerriAI's advisory says it is fixed in 1.83.11 and to upgrade to 1.83.11 or later. Because the advisory disagrees with itself between 1.83.10 and 1.83.11, align on 1.83.11 or later. However, 1.107.0, distributed on October 21, contained malware. Confirm in the official announcement that your target version is safe before choosing it (the LiteLLM 1.107.0 incident).
Block the endpoint upstream if you cannot update
The advisory's workaround is to block POST /guardrails/test_custom_code at your reverse proxy or API gateway. Also confirm the proxy itself is not exposed to the internet.
Narrow admin keys and check they have not leaked
The advisory says reaching the endpoint needs a proxy-admin credential in default configurations. Check that the admin key does not sit in shared chat, code or logs, and rotate it if in doubt (environment variables and API key basics).
Look for signs of compromise
In proxy access logs, look for calls to /guardrails/test_custom_code from unfamiliar times or sources. Also check child processes of the proxy and unfamiliar outbound connections. Per the advisory the proxy runs as root in the default Docker image, so if anything looks wrong, rotate every LLM provider key the proxy stores and review usage history at each provider (how to check for intrusion).
What kind of flaw this is
- CVE
- CVE-2026-40217 (LiteLLM proxy: sandbox escape in the custom-code guardrail)
- Severity
- CVSS v3.1 8.8 (High; AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)
- Type
- Unprotected alternate channel (CWE-420) per KEV and the advisory; the advisory also lists improper control of dynamically-managed code resources (CWE-913)
- Impact
- Arbitrary code runs in the proxy process; root in the default Docker image (BerriAI)
- Precondition
- In default configurations a proxy-admin credential is needed to reach the endpoint (BerriAI)
- Affected
- 1.81.8 up to but not including 1.83.10 (BerriAI advisory). The CVE record says LiteLLM through 2026-04-08
- Fix
- 1.83.11 or later (sandbox replaced with RestrictedPython); the advisory is inconsistent with 1.83.10
- Dates
- CVE published April 10, 2026; GitHub advisory May 11; added to KEV November 18 (due December 2)
- In short: a feature for testing guardrails runs user-written Python inside a hand-rolled sandbox, and that fence breaks under low-level handling of code. Neither the official sources nor this site give the method.
- The discoverer, a security firm, says it identified the issue on February 13, 2026 and published on April 8 (referenced by the CVE record). It notes no fix was available at publication.
What is known and what is not
| Item | Content | Status |
|---|---|---|
| The flaw | Sandbox escape in the custom-code guardrail | Confirmed (BerriAI) |
| Affected and fixed versions | 1.81.8 to before 1.83.10; upgrade to 1.83.11 or later | Confirmed (BerriAI; fixed-version number inconsistent in the advisory) |
| Authentication | Admin credential needed (advisory); KEV does not mention it | Under investigation |
| Exploitation | Added to KEV; SSVC exploitation active | Exploitation confirmed (CISA) |
| Attack method and victims | Not in official sources | Not stated |
Sources
- BerriAI — GHSA-wxxx-gvqv-xp7p (LiteLLM has a sandbox escape in custom-code guardrail) (affected versions, fix, workaround, precondition)
- CVE.org — CVE-2026-40217 (published April 10, 2026; CVSS 8.8)
- NVD — CVE-2026-40217
- CISA KEV — Known Exploited Vulnerabilities Catalog (added November 18, due December 2)
- X41 D-Sec — X41-2026-001 (LiteLLM) (discoverer's advisory; timeline and publication date)
No attack steps are included. Last verified: November 19, 2026.
Update history
2026-11-19: First report. Based on BerriAI's advisory, the CVE record and CISA KEV; the authentication question and the fixed-version inconsistency are listed as unconfirmed.
Read next
- A separate case (tampered package): LiteLLM 1.107.0 shipped a credential stealer
- Practice: Vulnerability remediation playbook / Asset inventory checklist
- Keys: Environment variables and API key basics
- Prioritizing: Deciding fix order with CVSS, EPSS and KEV
- Term: What RCE (remote code execution) is