News · CISA / BerriAI · 2 min read
Event date: · Published:
CISA adds actively exploited LiteLLM flaw to vulnerability catalog
CISA confirmed active exploitation of a sandbox escape flaw in BerriAI's LiteLLM AI gateway, adding CVE-2026-40217 to its Known Exploited Vulnerabilities catalog on November 18, 2026.
The U.S. Cybersecurity and Infrastructure Security Agency, CISA, added CVE-2026-40217 to its Known Exploited Vulnerabilities catalog on November 18, 2026, confirming that a sandbox escape remote code execution flaw in BerriAI's open-source LiteLLM AI gateway has been exploited in the wild. The listing is detailed in CISA's alert adding four vulnerabilities to the catalog.
What the advisory describes
- CISA added CVE-2026-40217 to the Known Exploited Vulnerabilities catalog on November 18, 2026, alongside flaws in Synology DSM, Apache Axis and REDCap
- The flaw affects BerriAI LiteLLM, an open-source gateway and proxy framework used to route requests to multiple model providers
- A GitHub security advisory gives the flaw a CVSS score of 8.8 and describes it as a sandbox escape in LiteLLM's custom-code guardrail feature
- The root cause is the
/guardrails/test_custom_codeendpoint accepting user-controlled bytecode that can be manipulated through bytecode rewriting and runs without adequate sandboxing - In the default configuration, exploitation requires a proxy-admin credential, but CISA's listing confirms the flaw has already been exploited in the wild
- The flaw is fixed in LiteLLM version
1.83.11, which replaces the hand-rolled sandbox with RestrictedPython
Why this matters for people building with AI
LiteLLM is widely used as a gateway for routing calls across providers such as OpenAI, Anthropic and Gemini, so a remote code execution flaw that is already being exploited puts any application relying on it as an AI gateway at risk. Because the vulnerability sits in a guardrail feature meant to vet custom code, teams that turned it on to test guardrail logic could be exposed even though the feature was meant to add safety, not remove it.
Fixing the flaw
Teams running LiteLLM as an AI gateway should upgrade to version 1.83.11 or later, where the custom-code guardrail sandbox has been replaced with RestrictedPython. Technical details, including the CVSS score and exploitation path, are documented in the GitHub security advisory for CVE-2026-40217.
Sources
- CISA Adds Four Known Exploited Vulnerabilities to Catalog (CISA, November 18, 2026, official)
- BerriAI LiteLLM sandbox escape advisory (CVE-2026-40217) (GitHub, November 18, 2026, official)
Written with AI assistance, strictly from the sources listed above. Before it went live, automated checks verified its dates, sources and every language edition.