LiteLLM CVE-2026-40217 Is Exploited: Affected Versions, Why to Use 1.83.11 and the Endpoint to Block

Published:

CISA added a LiteLLM flaw, CVE-2026-40217, to its Known Exploited Vulnerabilities (KEV) catalog on November 18, 2026, which means it has evidence the bug is being used in real attacks. LiteLLM is an open-source gateway many teams put in front of AI model APIs. The flaw lets someone who can reach its admin API run code on the server, and in the default Docker image that code runs as root. Federal agencies have until December 2 to act. Here is who is affected, which version to install, what to block if you cannot upgrade yet and what the sources disagree on.

What is CVE-2026-40217?

It is a sandbox escape in LiteLLM’s custom-code guardrail feature. The endpoint POST /guardrails/test_custom_code runs user-supplied Python inside a home-made filter, and security firm X41 D-Sec showed that string concatenation and bytecode rewriting get around it. The result is arbitrary command execution in the proxy process, which according to X41 and the GitHub advisory runs as root in the default Docker image. CISA’s catalog describes it as an “unprotected alternate channel” bug that lets remote attackers run code through that endpoint.

In default configurations the request needs a proxy-admin credential: X41 says the endpoint “requires authentication with the master key,” and GitHub rates the privileges required as high. That lowers the risk for a gateway that is not exposed, but it does not remove it. An attacker who has stolen or guessed an admin key, or who reaches an exposed admin interface, gets code execution on the host.

Which versions are affected and which one fixes it?

  • Affected: the GitHub advisory lists the litellm Python package from 1.81.8 up to, but not including, 1.83.10.
  • Fixed: the advisory contradicts itself. Its “patched versions” field says 1.83.10, while its patch section says “Fixed in 1.83.11.” The advisory’s references link the patched release as v1.83.10-stable. GitHub shows that release was published on April 27, but its page has no notes and does not name this CVE, so it does not settle which build contains the fix. The safe choice is 1.83.11 or later.
  • X41’s view: when X41 published on April 8, 2026, it listed only the main-latest Docker image as confirmed vulnerable and said no vendor patch was available then. Its CVSS score is 8.7; GitHub’s is 7.5 (High, CVSS 4.0). Scores differ by who does the rating.

How do you check and fix it?

  1. Find your version. Check the installed package version or the image tag your gateway runs. Anything from 1.81.8 to 1.83.10 needs action.
  2. Upgrade to 1.83.11 or later and restart the proxy.
  3. Block the endpoint now if you cannot upgrade. GitHub’s advisory says to block POST /guardrails/test_custom_code at your reverse proxy or API gateway. X41 also advises restricting access to the admin API and master key and limiting network access to the management interface.
  4. Do not run the container as root. X41 recommends an unprivileged user.
  5. Look back. Search proxy and gateway logs for requests to that path from before you blocked it. If the admin API was reachable from the internet, treat the master key and any provider keys stored in the gateway as possibly exposed and rotate them. That last step is our advice, not a vendor requirement.

What is the CISA deadline?

CISA’s KEV entry for CVE-2026-40217 carries a federal due date of December 2, 2026, and lists known ransomware use as “Unknown.” CISA’s November 18 alert adds four entries based on evidence of active exploitation: this one, the Synology DSM flaw CVE-2024-10441, the Apache Axis flaw CVE-2026-90436 and the REDCap flaw CVE-2026-90817. Our weekly KEV roundup covers all of them, and the Axis bug is the one behind our Confluence Data Center story.

What is still unknown?

  • Who is exploiting it, how many systems are affected and what attackers do after getting in. CISA’s alert gives no victims or campaign details.
  • Which version is the true first fixed release. The advisory lists both 1.83.10 and 1.83.11, which is why we say 1.83.11 or later.
  • Whether any exposure exists beyond the admin API. The sources we opened describe an authenticated attack path.

Sources

Image: server racks in a data center, by Carl Lender, CC BY 2.0, via Wikimedia Commons.

Like our coverage? Add stepphase.com as a preferred source on Google to see more of our stories in Top Stories.

Saif Ali Tai
Saif Ali Taihttps://xplorely.com/
I'm Saif Ali Tai, a tech blogger and software engineer with 8+ years of experience building apps, and I run StepPhase as its editor. I cover technology news, AI tools and security stories that matter to everyday users. Articles here are drafted with AI assistance and checked against the sources linked in each post.

Related articles

Recent articles