CISA adds exploited LiteLLM remote code execution flaw CVE-2026-40217 to KEV catalogue
On 18 November 2026, CISA added CVE-2026-40217, a flaw in BerriAI's LiteLLM AI gateway, to its catalogue of actively exploited vulnerabilities. Any organisation running an exposed LiteLLM proxy is at risk, because a remote attacker can execute arbitrary code on it.
What to do now
- Product
- BerriAI LiteLLM
- Affected versions
- —
- CVE
- CVE-2026-40217
On 18 November 2026, the US Cybersecurity and Infrastructure Security Agency listed CVE-2026-40217 in its Known Exploited Vulnerabilities catalogue. A KEV listing means the agency has evidence that the flaw is being exploited in real attacks. The affected product is LiteLLM, BerriAI's open-source gateway that gives applications a single interface to multiple large language model providers.
The weakness is classified as an unprotected alternate channel (CWE-420). It sits at the /guardrails/test_custom_code URI, an endpoint for testing custom guardrail code. According to the description, a remote attacker can use bytecode rewriting to get around the intended restrictions and run arbitrary code on the server.
The impact can be serious. A LiteLLM proxy often holds API keys for several AI providers and handles user prompts and responses. Code execution on that host can therefore expose credentials and sensitive data.
The source does not list the affected or fixed versions. It points to a BerriAI security advisory on GitHub (GHSA-wxxx-gvqv-xp7p) for the vendor's remediation instructions. CISA also says it does not know whether the flaw has been used in ransomware campaigns.
US federal civilian agencies must apply the vendor's mitigations by 2 December 2026 under Binding Operational Directive 26-04. If no mitigation is available, they must stop using the product. That deadline is a useful guide to how urgently other organisations should act.
What to do now
- Find every LiteLLM instance in your environment and check whether any of them can be reached from the internet.
- Apply the fixes or mitigations described in BerriAI's GitHub advisory GHSA-wxxx-gvqv-xp7p as soon as possible.
- Until you have patched, block access to the /guardrails/test_custom_code URI at your reverse proxy or firewall, as general good practice.
- Review logs for requests to /guardrails/test_custom_code and rotate the provider API keys stored on any instance that was exposed.