CISA Adds LiteLLM RCE Flaw to KEV Catalog, Patch by Dec. 2
CISA says BerriAI's LiteLLM proxy has an actively exploited sandbox-escape flaw that lets an admin-level attacker run code as root; agencies must patch by December 2.
CISA added CVE-2026-40217, an unprotected alternate channel vulnerability in BerriAI's LiteLLM proxy, to its Known Exploited Vulnerabilities (KEV) catalog on November 18, 2026. The flaw lets an attacker with proxy-admin access escape LiteLLM's custom-code guardrail sandbox and run arbitrary code in the proxy process, which runs as root in LiteLLM's default Docker image. CISA's binding directive gives federal civilian agencies until December 2, 2026 to patch or mitigate it.
What Happened
CISA's Known Exploited Vulnerabilities catalog is a running list of CVEs the agency has confirmed are being exploited in the wild. Under Binding Operational Directive 26-04, every CVE added to KEV carries a fixed remediation deadline that U.S. federal civilian executive branch (FCEB) agencies are required to meet. CVE-2026-40217 was added to the catalog on November 18, 2026, with a due date of December 2, 2026 — a 14-day remediation window.
CISA's catalog entry names the flaw the "BerriAI LiteLLM Unprotected Alternate Channel Vulnerability" and describes it as allowing "remote attackers to execute arbitrary code via bytecode rewriting at the /guardrails/test_custom_code URI." The agency tracks the bug under CWE-420 (Unprotected Alternate Channel) and lists its knownRansomwareCampaignUse as "Unknown." CISA's required action is to apply vendor mitigations in line with BOD 26-04 guidance, or discontinue use of the product if no mitigation is available.
This is the first time Pandromeda has covered a security issue affecting LiteLLM specifically, though the pattern of a widely deployed developer tool landing on KEV months after its original patch will be familiar to anyone tracking recent additions. CISA's catalog entry cites the GitHub security advisory, the NVD record and BerriAI's own release notes as its supporting sources, and this article draws directly on those three documents rather than secondhand summaries.
What Is LiteLLM, and Why Does It Matter Here
LiteLLM is an open-source gateway and proxy maintained by BerriAI that gives applications a single, OpenAI-compatible API in front of more than 100 large language model providers — OpenAI, Anthropic, Azure, Bedrock, Vertex AI and others. Teams run it as a self-hosted proxy to centralize API keys, enforce spend limits, route traffic between models, and apply "guardrails" that screen prompts and completions for sensitive content or policy violations before they reach a model or a user.
Because LiteLLM sits in front of an organization's LLM traffic, often with its own privileged credentials to multiple model providers, the proxy process is a high-value target. A remote-code-execution bug in that process does not just expose LiteLLM itself — it can expose every upstream API key and backend the proxy is configured to reach, and, since the process commonly runs as root in LiteLLM's published Docker image, it hands an attacker root on the host container as well.
How the Flaw Works
The vulnerability lives in LiteLLM's custom-code guardrail feature, which lets an administrator define guardrail logic in Python and test it through a dedicated endpoint, POST /guardrails/test_custom_code. According to BerriAI's GitHub security advisory, that endpoint executes the submitted Python inside a hand-rolled sandbox rather than a hardened, well-audited isolation mechanism. The advisory says the sandbox "can be escaped using bytecode-level techniques," letting an attacker's code break out of the restricted execution context and run with the full privileges of the proxy process itself — arbitrary code execution, not just a guardrail bypass.
BerriAI's advisory and CISA's catalog entry both note that reaching the vulnerable endpoint requires a proxy-admin credential in LiteLLM's default configuration, which somewhat narrows the attack surface to an attacker who has already obtained or stolen admin-level access to a LiteLLM deployment. CISA's "unprotected alternate channel" framing (CWE-420) reflects that the guardrail-testing path offered an unintended route to full code execution that bypassed the protections the rest of the proxy relies on. NVD's independent scoring treats the bug more severely: its CVSS v3.1 base score is 8.8 (High), under the vector AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H, reflecting network attack vector, low complexity, and complete loss of confidentiality, integrity and availability once triggered. NVD also cross-lists the weakness as CWE-94, Improper Control of Generation of Code ("Code Injection"), alongside CISA's CWE-420 classification.
BerriAI's own advisory rates the issue lower, at CVSS v4 5.9 (Moderate), under CVSS:4.0/AV:N/AC:H/AT:N/PR:H/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N — a scoring gap that is common when a vendor weighs the admin-credential prerequisite more heavily than a government or industry scorer does. The advisory classifies the underlying weakness as CWE-913, Improper Control of Dynamically-Managed Code Resources.
| Field | Detail |
|---|---|
| CVE ID | CVE-2026-40217 |
| Vulnerability name | BerriAI LiteLLM Unprotected Alternate Channel Vulnerability |
| CVSS v3.1 (NVD) | 8.8 High — AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| CVSS v4 (BerriAI advisory) | 5.9 Moderate — AV:N/AC:H/AT:N/PR:H/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N |
| CWE | CWE-420 (CISA), CWE-94 (NVD), CWE-913 (GitHub advisory) |
| Vulnerable endpoint | POST /guardrails/test_custom_code |
| Affected versions | litellm >= 1.81.8, < 1.83.10 |
| Fixed version | 1.83.11 (hand-rolled sandbox replaced with RestrictedPython) |
| KEV date added | November 18, 2026 |
| KEV remediation due date | December 2, 2026 |
Who Is Affected
BerriAI's advisory, published May 7, 2026 and tracked as GHSA-wxxx-gvqv-xp7p, lists affected versions of the litellm PyPI package as those at or above 1.81.8 and below 1.83.10. Any self-hosted LiteLLM proxy running a version in that range, with the custom-code guardrail feature reachable by an admin-level credential, is exposed. Organizations running LiteLLM as a managed or SaaS deployment through a third party should confirm with that provider which version is in use.
The prerequisite of proxy-admin credentials means this is not an unauthenticated, internet-wide exploit path the way some KEV entries are. It is most dangerous in two scenarios: where admin credentials have already leaked or been phished, or where a LiteLLM deployment has weak separation between lower-privileged users and full proxy-admin rights — letting a compromised lower-tier account escalate to code execution through the guardrail-testing endpoint.
The impact once that bar is cleared is severe precisely because of what a LiteLLM proxy typically holds. A production deployment is usually configured with credentials for every upstream model provider it routes to — OpenAI, Anthropic, Azure OpenAI, Bedrock and others — plus any internal secrets used for rate limiting, logging or spend tracking. Arbitrary code execution inside that process can expose all of it in one step, and because the official Docker image runs the proxy as root, an attacker who escapes the sandbox can also pivot to the underlying container with full administrative rights rather than a restricted service account.
Why CISA Added a Six-Month-Old Bug to KEV Now
BerriAI disclosed and patched this vulnerability back in May 2026, more than six months before CISA's KEV listing. That gap is not unusual: CISA adds a CVE to KEV only once it has evidence of active, in-the-wild exploitation, which can surface well after a vendor patch ships, once a working exploit chain is observed, security researchers publish technical detail, or defenders report confirmed intrusions. The underlying GitHub advisory already pointed to a third-party technical write-up from X41 D-Sec on the sandbox-escape technique, which may have accelerated public understanding of how the bug could be weaponized. CISA has followed a similar pattern with other recent KEV additions, including a multi-year-old Synology DSM vulnerability that was only confirmed as actively exploited long after its original patch shipped.
The KEV catalog entry marks knownRansomwareCampaignUse as "Unknown," meaning CISA has not tied this specific CVE to a ransomware operation, but that designation is separate from the active-exploitation finding that triggers KEV inclusion in the first place.
The December 2 Patch Deadline, Explained
CISA's KEV listings are enforceable for FCEB agencies under Binding Operational Directive 26-04, which requires agencies to remediate catalog entries by the stated due date or document a formal exception. For CVE-2026-40217, that date is December 2, 2026 — 14 days after the November 18 KEV addition. CISA's required action language also points agencies to the directive's "Forensics Triage Requirements" guidance, and tells agencies to follow applicable cloud-service guidance or discontinue use of the product if no mitigation is available.
How to Patch or Mitigate LiteLLM
BerriAI's fix, shipped in LiteLLM 1.83.11, replaces the vulnerable hand-rolled sandbox with RestrictedPython, a maintained, purpose-built library for safely executing untrusted Python. Organizations running an affected version should:
- Upgrade self-hosted LiteLLM proxy deployments to version 1.83.11 or later.
- If an immediate upgrade is not possible, block
POST /guardrails/test_custom_codeat a reverse proxy or API gateway in front of LiteLLM, per BerriAI's published workaround. - Audit who holds proxy-admin credentials on any LiteLLM deployment, and rotate any admin credential suspected of exposure.
- Review separation between lower-privileged LiteLLM users and full proxy-admin rights to limit the blast radius of any single compromised account.
- Check logs for unexpected calls to the custom-code guardrail test endpoint, particularly from accounts that would not normally author or test guardrail code.
Teams that have already dealt with a recent KEV deadline on another self-hosted tool — for example the Perforce Puppet Enterprise KEV addition or the Cisco BroadWorks XXE flaw — will recognize the pattern: confirm the running version, apply the vendor fix or documented workaround, and verify no indicators of prior compromise before closing the ticket.
What to Do Next
If you operate a self-hosted LiteLLM proxy, the first step is simply confirming your running version. Anything at or above 1.81.8 and below 1.83.10 is in the affected range and should be upgraded to 1.83.11 or later as soon as possible; agencies bound by BOD 26-04 must do so by December 2, 2026. If an upgrade can't happen immediately, block the /guardrails/test_custom_code endpoint at your gateway as an interim measure, and treat any proxy-admin credential that may have been exposed as compromised until rotated. Because the proxy commonly runs as root in BerriAI's default Docker image, also confirm your container is not running with unnecessary host privileges, independent of this specific CVE.
Beyond this single fix, the broader lesson is about guardrail and sandboxing features generally: any component that deliberately executes user- or admin-supplied code, even for a legitimate purpose like testing a content filter, needs the same security scrutiny as a public-facing API. Teams building or operating LLM infrastructure should treat custom-code execution paths as a standing risk category and confirm they rely on audited isolation libraries rather than bespoke sandboxing logic.
Frequently Asked Questions
What is CVE-2026-40217?
It's a vulnerability in BerriAI's LiteLLM proxy that lets an attacker with proxy-admin access escape the custom-code guardrail sandbox and execute arbitrary code in the proxy process via the /guardrails/test_custom_code endpoint.
When does my organization need to patch it?
CISA's KEV catalog sets a remediation due date of December 2, 2026 for federal civilian agencies. Other organizations running affected LiteLLM versions should treat that as a practical deadline too.
Which LiteLLM versions are affected?
Versions 1.81.8 up to, but not including, 1.83.10 are affected. The fix shipped in version 1.83.11.
Do I need to upgrade immediately, or is there a workaround?
Upgrading to LiteLLM 1.83.11 or later is the full fix. If that's not immediately possible, BerriAI recommends blocking POST /guardrails/test_custom_code at your reverse proxy or API gateway as an interim mitigation.
Is this exploitable without credentials?
No. Reaching the vulnerable endpoint requires a proxy-admin credential in LiteLLM's default configuration, according to both BerriAI's advisory and CISA's catalog entry.
Why did CISA add a vulnerability from May 2026 to KEV in November?
CISA adds CVEs to KEV once it confirms active, in-the-wild exploitation, which can occur well after a vendor's original patch date. The catalog entry doesn't specify what triggered the November 18 addition beyond confirming observed exploitation.
Frequently asked questions
What is CVE-2026-40217?
It's a vulnerability in BerriAI's LiteLLM proxy that lets an attacker with proxy-admin access escape the custom-code guardrail sandbox and execute arbitrary code in the proxy process via the /guardrails/test_custom_code endpoint.
When does my organization need to patch it?
CISA's KEV catalog sets a remediation due date of December 2, 2026 for federal civilian agencies. Other organizations running affected LiteLLM versions should treat that as a practical deadline too.
Which LiteLLM versions are affected?
Versions 1.81.8 up to, but not including, 1.83.10 are affected. The fix shipped in version 1.83.11.
Do I need to upgrade immediately, or is there a workaround?
Upgrading to LiteLLM 1.83.11 or later is the full fix. If that's not immediately possible, BerriAI recommends blocking POST /guardrails/test_custom_code at your reverse proxy or API gateway as an interim mitigation.
Is this exploitable without credentials?
No. Reaching the vulnerable endpoint requires a proxy-admin credential in LiteLLM's default configuration, according to both BerriAI's advisory and CISA's catalog entry.
Why did CISA add a vulnerability from May 2026 to KEV in November?
CISA adds CVEs to KEV once it confirms active, in-the-wild exploitation, which can occur well after a vendor's original patch date. The catalog entry doesn't specify what triggered the November 18 addition beyond confirming observed exploitation.
Sources
- CISA KEV Catalog: CVE-2026-40217 entrycisa.gov
- CISA: Known Exploited Vulnerabilities Catalog (JSON feed)cisa.gov
- CISA: BOD 26-04, Prioritizing Security Updates Based on Riskcisa.gov
- NVD: CVE-2026-40217 Detailnvd.nist.gov
- GitHub Security Advisory: GHSA-wxxx-gvqv-xp7p (BerriAI/litellm)github.com
- BerriAI/litellm GitHub repositorygithub.com
Sana Qureshi runs the security and privacy desk. She reports on actively exploited vulnerabilities, vendor patches and data breaches, and covers the password managers, VPNs and authentication tools readers use to protect themselves. Her alerts cite vendor advisories, CISA and the CVE record directly.

