LiteLLM's Guardrail Sandbox Escape Reaches CISA's Exploited List Seven Months After Disclosure
Security / news
LiteLLM's Guardrail Sandbox Escape Reaches CISA's Exploited List Seven Months After Disclosure
X41 D-Sec published CVE-2026-40217 on April 8 with no vendor patch. CISA listed it as exploited on November 18. The fix is 1.83.10, and the bug needs the master key.
An attacker who holds the LiteLLM master key can run arbitrary commands on the proxy host by sending Python to the /guardrails/test_custom_code endpoint, and the process runs as root in the default Docker image. CISA added the flaw, CVE-2026-40217, to its Known Exploited Vulnerabilities catalog on November 18, 2026, seven months after it was first published.
The fix is LiteLLM 1.83.10, according to OSV, which gives the affected range as 1.81.8 up to that release. Federal agencies have until December 2 under the KEV entry.
The disclosure timeline
X41 D-Sec GmbH found the issue; the advisory credits Markus Vervier. The dates come from X41-2026-001:
| Date | Event |
|---|---|
| 2026-02-13 | X41 identifies the issue and builds a proof of concept |
| 2026-02-18 | LiteLLM acknowledges the report, gives a fix ETA of the end of the following week |
| 2026-03-24 | Urgent follow-up to the technical contact fails to deliver |
| 2026-04-06 | BerriAI asks for the report through its GitHub security page |
| 2026-04-08 | Maximum embargo expires and the advisory is published |
| 2026-11-18 | CISA adds the CVE to KEV |
At publication X41 listed no confirmed patched version and wrote that no vendor patch was available. OSV's record was published on April 10 and last modified on November 20, two days after the KEV listing. It is the source for 1.83.10.
What an attacker needs
The endpoint runs submitted Python to test custom guardrails and tries to block dangerous operations with regex filtering on the source text. Because the filter reads only literal text, X41 says it can be bypassed. The described route builds blocked names at runtime, reaches a base class by another path, rewrites a generator's bytecode name table and swaps a function's code object to reach unrestricted builtins and imports.
Three preconditions apply:
- Authentication with the master key, or equivalent access to that endpoint.
- Network reach to the LiteLLM management interface.
- A process running as root for the worst outcome, which is the default Docker image.
X41 scores it CVSS 4.0 at 8.7 (High). OSV carries 8.8 under CVSS 3.1 with low privileges required. The score is defensible, but the privilege requirement decides who is exposed. A master key is an administrator credential, so an attacker needs to steal one or find the port open without it being rotated. Neither the advisory nor the KEV entry says who is exploiting this or how they obtained access.
Two classifications for one bug
X41 files the weakness as CWE-94, code injection. CISA's catalog names it "Unprotected Alternate Channel" and tags CWE-420, and describes it as code execution through bytecode rewriting. NVD uses the same CWE as CISA. The difference matters little to defenders, but it explains why searches for "LiteLLM code injection" and "LiteLLM unprotected alternate channel" return different records.

What to do
Upgrade to 1.83.10 or later. If that is not possible this week, X41 lists four workarounds:
- Block
/guardrails/test_custom_codeat the reverse proxy, such as nginx or Caddy. - Restrict the master key to trusted administrators, away from ordinary API consumers.
- Limit the admin port with firewall rules or VPC security groups.
- Run the container with
--userset to an unprivileged account.
The KEV entry gives a December 2 deadline and sets the forensic triage flag to "No". Other entries added between November 20 and November 24 include the Idunno.AntiCsrf deserialization bug and SAP NetWeaver's CVE-2025-42884, both covered on this site.
Sources
More in Security
- 01VMware vCenter Directory Service Flaw Was Exploited in September, Two Months Before Broadcom's PatchCVE-2026-123890 needs only network access and no credentials. Broadcom lists no workaround, and the fix cannot go through vCenter Quick Patch.
- 02Mitel Scored Three of Five MiCollab Flaws Medium. CISA Listed All Five as ExploitedMISA-2026-0012 rates two critical and three medium. CISA's KEV entries of November 25 give four of them a November 28 deadline. Mitel's advisory does not say any are exploited.
- 03Drupal Patched Its Installer on November 18, Then Had to Patch It Again on November 25SA-CORE-2026-017 was exploited from November 19. A second advisory says sites that left install.php reachable may already be compromised, and that a patched site can look clean.
- 04Cacti Zero-Day With Public Exploit Needs Only an Enabled Guest AccountA researcher published a four-request exploit against Cacti Core 1.2.31 on Thanksgiving Day, and the reporting so far carries no CVE, no score and no vendor response.