20 NOV 2026 — The US Cybersecurity and Infrastructure Security Agency (CISA) added a flaw in LiteLLM, the open-source gateway that many companies put between their applications and AI model providers, to its catalogue of exploited vulnerabilities on 18 November. That listing means CISA has evidence of attacks. US federal civilian agencies have until 2 December to fix it.
The flaw, CVE-2026-40217, is not new. LiteLLM's maintainers, BerriAI, published an advisory for it on 7 May and rated it medium, because an attacker needs an administrator's credential before they can use it. CISA listed it 195 days later. Whether that credential is actually secret is what an operator has to judge.
What the flaw does
LiteLLM lets administrators write "guardrails", small pieces of Python that inspect requests and responses passing through the gateway. A test endpoint, /guardrails/test_custom_code, runs that code inside what the advisory calls a "hand-rolled sandbox". The sandbox can be escaped with bytecode-level techniques, the advisory says, giving arbitrary code execution in the proxy process, "which runs as root in the default Docker image".
A gateway is a valuable machine to take over. It holds the API keys for every model provider an organisation routes through it and whatever cloud credentials sit on the host. CISA's entry describes the bug as remote code execution "via bytecode rewriting" at that endpoint. It does not say who is exploiting it, against whom, or since when.
Why the admin requirement protects less
The advisory scores the flaw 5.9 under CVSS version 4, with the "privileges required" metric set to high. That score fits a deployment where the administrator's key is secret. It does not hold everywhere.
In September, Wiz Research reported scanning 3,074 internet-facing LiteLLM proxies in February. Of those, 294, or 9.6%, accepted the default master key sk-1234, the example key used in LiteLLM's own quickstart material, or required no authentication at all. For 191 of them, 6.2%, there was no authentication. Wiz was writing about a different flaw in the same custom-code guardrail feature, but its conclusion carries over. On those instances, a bug that needs an administrator is "effectively pre-auth".
We reported that scan on 11 September. CVE-2026-40217 was one of the flaws listed alongside it. It was not on CISA's list then.
The second LiteLLM entry since September
This is the second LiteLLM flaw in the catalogue by our count. The first, CVE-2026-59822, an authentication bypass through the gateway's MCP endpoint, was added on 2 September with the same 14-day deadline. The key dates run:
- 7 May: BerriAI publishes the advisory for CVE-2026-40217, rated medium.
- 2 September: CISA lists CVE-2026-59822, the MCP authentication bypass.
- 9 September: Wiz publishes its scan of exposed proxies.
- 18 November: CISA lists CVE-2026-40217, with a deadline of 2 December.
CISA's other three additions on 18 November, for Synology's DiskStation Manager, Vanderbilt University's REDCap research database and Apache Axis, were given three days rather than fourteen, and flagged for the agency's forensic triage requirements. The LiteLLM entry was not.
Which version fixes it
The advisory text and structured data do not quite match here. Its text says the bug is "Fixed in 1.83.11" and that the hand-rolled sandbox was replaced with RestrictedPython, a library built for running restricted Python. Its structured data marks versions from 1.81.8 up to but not including 1.83.10 as affected and 1.83.10 as patched, and it links to the 1.83.10-stable release. An operator who wants to be sure of both readings should be on 1.83.11 or later.
For anyone who cannot upgrade at once, the advisory's workaround is to block POST /guardrails/test_custom_code at the reverse proxy or API gateway in front of LiteLLM. Changing a master key that is still sk-1234 addresses the Wiz finding directly and should be done regardless of version. Our guide to self-hosting LiteLLM uses a locally generated key for that reason.