sysnote
News

CISA lists LiteLLM's CVE-2026-40217 as exploited; Google's attack report describes a different LiteLLM bug

CISA added CVE-2026-40217 in LiteLLM to its Known Exploited Vulnerabilities catalog on November 18, with a December 2 deadline for US federal agencies. The CVE is a sandbox escape in the proxy's POST /guardrails/test_custom_code endpoint. Google Threat Intelligence Group's November 2 report on LLMjacking, the theft and resale of companies' access to language models, attaches the same CVE number to a different flaw, a user_id rebind in /key/regenerate. That one has no CVE or advisory, and LiteLLM fixed it about a month after the sandbox escape. A LiteLLM proxy patched only for the CVE in the catalog can still have it.

The CVE in the catalog

Markus Vervier of X41 D-Sec found the sandbox escape and published it on April 8 (X41-2026-001), when the distros mailing list embargo ran out. The guardrail test endpoint runs Python sent in the request so an administrator can try out a custom guardrail. The old sandbox filtered the source text with regular expressions. Building names like __globals__ from string fragments and reaching builtins through a generator's internals got past it, and the code then ran inside the proxy process, which runs as root in the default Docker image.

LiteLLM's advisory (GHSA-wxxx-gvqv-xp7p) says that reaching the endpoint "requires a proxy-admin credential in default configurations". The fix replaced the filter with RestrictedPython. The advisory lists 1.83.10 as the first patched version, while its text says to upgrade to 1.83.11. We unpacked both PyPI wheels, and both already contain the RestrictedPython sandbox.

CISA's entry doesn't say what evidence it used. Attempts on this endpoint are documented elsewhere: Zenity Labs researchers Avishai Efrat and Ayush RoyChowdhury reported in June 569 requests to it on their honeypots between April 15 and May 24. The attackers guessed 47 different master keys, such as LiteLLM's documentation example sk-1234, and some requests carried escape payloads. Zenity replayed those payloads on LiteLLM 1.83.0, where they read the proxy's environment and ran commands.

What Google described

Google's report, which we cited when Fireworks AI disclosed its breach, describes one intrusion step by step. A second group obtained "pre-validated Virtual Keys" (ordinary per-user inference keys) from the group that had broken in, then "exploited a user ID rebind vulnerability in the /key/regenerate endpoint (CVE-2026-40217) to elevate standard Virtual Keys into full PROXY_ADMIN master administrative credentials". Google's AI Threat Tracker of November 16 calls CVE-2026-40217 "a sandbox escape in LiteLLM that allows an attacker to elevate limited-access inference keys" to admin. The sandbox escape, by LiteLLM's account, starts from an admin key, so the two descriptions don't fit together.

The flaw in Google's November 2 description is real. LiteLLM fixed it on May 13 in commit 7738b035 (PR #27793), titled "close /key/regenerate ownership-rebind + premium-gate bypass". Its message says that a non-admin caller could change the user_id of their own key through /key/regenerate, because /key/update checked ownership changes and the regenerate path did not. On the next request the proxy looked up the new user_id and returned PROXY_ADMIN if that user was an admin, for example the default_user_id row created at the first password login to the admin UI.

None of the 19 published advisories in LiteLLM's repository mentions /key/regenerate, and an NVD search for LiteLLM and "regenerate" returns nothing. Corgea's write-up of the KEV listing pointed out the same mismatch.

Which versions have which fix

The fix adds a helper, _validate_caller_can_change_key_ownership. We looked for it in the PyPI wheels. It is absent from 1.83.10, 1.83.11 and 1.83.14, the last 1.83.x release (April 26), and present from 1.84.0, released on May 14. A proxy on 1.83.x is past the KEV fix but still open to the rebind. Upgrading to 1.84.0 or later closes both; the current release is 1.110.2.

Google doesn't say which LiteLLM version its victim ran, or whether the attacker went on to the guardrail endpoint once it had admin rights. On a build older than 1.83.10 that would have been possible: an admin key opens the endpoint, and the escape gives a shell. The public sources leave open whether the intrusion in Google's report involved the CVE now in the catalog at all.

Comments

No comments yet. Be the first.

Write a comment

Comments are published after review.