LiteLLM: an April flaw CISA now flags as exploited
CISA flagged as exploited a LiteLLM flaw fixed in April. Why it matters if you connect your apps to AI models, and what to check in your own installation.
LiteLLM is an open-source program many companies use to connect their applications to AI models from different providers. On November 18, the US cybersecurity agency, CISA, added one of its flaws to its catalog of exploited vulnerabilities. The flaw was fixed in April. This guide explains what it allows, why it matters and what to check. Public status as of November 26, 2026.
- What LiteLLM is: a proxy that takes requests from applications and routes them to AI providers. That's why it holds those providers' keys.
- The flaw: CVE-2026-40217 lets an attacker run code on the proxy's server through a feature for testing control rules. It requires a proxy administration credential.
- There have already been attempts: researchers logged 569 attempts to use it between April and May, many trying the example key from the documentation.
- What to do: update LiteLLM, change the master key if it's a known one, keep administration off the internet and rotate provider keys if in doubt.
What LiteLLM is and why it matters
LiteLLM works as a gateway: the company's applications talk to LiteLLM, and LiteLLM talks to OpenAI, Anthropic, Google or other providers, or to self-hosted models. That way, who uses which model and how much they spend is controlled in one place. Its GitHub repository has over 63,000 stars.
That central position is also its risk. The LiteLLM server holds the providers' API keys and sometimes cloud credentials. Anyone who manages to run code on that server can take them.
What the flaw is
LiteLLM lets you define control rules, called guardrails, written in Python. To test them, it offers a route, /guardrails/test_custom_code, that runs the code it receives inside a hand-built sandbox. According to LiteLLM's advisory, that sandbox could be escaped with techniques on Python's compiled code, allowing arbitrary code to run in the proxy process. In the official Docker image, that process runs as root.
- Severity: 8.8 out of 10 (CVSS 3.1), according to the advisory.
- Requirement: in the default configuration, the attacker needs a proxy administrator credential.
- Affected versions: from 1.81.8 up to before 1.83.10, according to GitHub's advisory database. The text of the same advisory names 1.83.11 as the fixed version, so it's best to move to a version later than both.
- Fix: LiteLLM replaced the home-made sandbox with RestrictedPython, a library built for that purpose.
How it's being used
The security company Zenity published in June what its honeypot sensors saw between April 15 and May 24:
- 569 requests to the vulnerable route. Of those, 520 arrived on April 15, the same day as the fix according to Zenity, and only checked whether the server would run code.
- 47 different keys tried, such as sk-1234, sk-admin or sk-changeme. According to Zenity, sk-1234 is the example key in LiteLLM's documentation, so the likely target is installations that left it unchanged.
- What they were after: the payloads tried to read the server's environment variables, where provider keys, the master key and cloud credentials often live, or to run commands in the background.
CISA added the flaw to its catalog on November 18 and gave federal agencies until December 2. That deadline only binds them, but it signals that exploitation is confirmed.
One link in a chain
The company Obsidian Security described in June a chain of three flaws that takes a low-privilege user all the way to control of the server: one lets a user create a key with access to administration routes (CVE-2026-47101), another lets a user raise their own role to administrator (CVE-2026-47102), and the third is this code execution. According to Obsidian, version 1.83.14-stable is the first to fix all three.
It isn't LiteLLM's first flaw in CISA's catalog. There have been four in 2026:
| Added to the catalog | CVE | What it allows | Fixed in |
|---|---|---|---|
| May 8 | CVE-2026-42208 | SQL injection in the proxy's key verification | 1.83.7 |
| June 8 | CVE-2026-42271 | Command execution by an authenticated user | 1.83.7 |
| September 2 | CVE-2026-59822 | An authenticated MCP session with any token | 1.84.0 |
| November 18 | CVE-2026-40217 | Code execution while testing control rules | 1.83.10 |
What to do
- Update. Bring LiteLLM to a current version. The latest published on GitHub as of November 26 is 1.111.0. At a minimum, 1.84.0, which fixes all four catalog flaws, although other advisories have been published since.
- Change the master key. If it's the documentation's example key or an easy-to-guess one, change it.
- Don't expose administration. The interface and the administration routes shouldn't be reachable from the internet.
- Block the route if you can't update. LiteLLM's advisory recommends blocking POST requests to /guardrails/test_custom_code at the reverse proxy or API gateway.
- Don't run as root. Zenity recommends changing the container's default user.
- Rotate keys if in doubt. If the proxy was exposed on a vulnerable version, change the AI provider keys and cloud credentials it held, and review spending with each provider.
What we don't know
- How many LiteLLM servers were attacked.
- What evidence of exploitation CISA used to add the flaw in November.
- Whether recent attacks combine this flaw with others in the chain.
Frequently asked questions
Could I be using LiteLLM without knowing it? Possibly, if another team or a provider set up your integration with AI models. It's worth asking them which gateway they use.
Can anyone exploit the flaw? Not directly. It needs an administrator credential, but attackers try default keys, and other LiteLLM flaws allow privilege escalation.
I updated in April. Is that enough? It fixes this flaw, but others have been published since. It's best to move to a current version.
What do I lose if I'm attacked? The AI providers' API keys, which a third party can use to run models on your account, and any cloud credentials the server holds.
Sources
- Advisory GHSA-wxxx-gvqv-xp7p, LiteLLM: the flaw, versions, severity and stopgap.
- CISA Known Exploited Vulnerabilities catalog: CVE-2026-40217 and LiteLLM's other flaws.
- Zenity Labs: exploitation attempts observed between April and May.
- Obsidian Security: the chain of three flaws.
- LiteLLM security advisories and releases.
Keep reading
- Local AI and privacy: running on your machine doesn't mean nothing leaves
- Drupal: two installer flaws, already exploited
Contact
If your company connects applications to AI models and wants to review how it protects its keys and its gateway, ITLab can help. Contact us.
Do you need someone to take care of your technology?
Tell us what you need to organize, protect or solve. The first conversation has no cost: we assess whether our model fits you and what the next steps would be.
Let's talk about your business