Summary
| Parameter | Value |
|---|---|
| CVE ID | CVE-2026-40217 |
| Alert Source | CISA KEV - Active Exploitation |
| CVE Publication Year | 2026 |
| Date Published | 2026-11-18 |
| Vendor | BerriAI |
| Product | LiteLLM (proxy / AI gateway); also shipped in Red Hat products |
| Vulnerability Type | code injection (CWE-94), guardrail sandbox escape |
| CVSS Score | 8.8 (high) |
| EPSS Score | 17.0% (percentile: 97%) |
| CISA KEV | Yes - confirmed active exploitation |
| Ransomware | Not confirmed |
| Remediation Deadline | 2026-12-02 |
Vulnerability Description
Source: NVD, CISA KEV, X41 D-Sec (X41-2026-001)
LiteLLM is an open-source proxy that exposes a single OpenAI-compatible API to more than a hundred LLM providers (load balancing, cost tracking, rate limiting, guardrails). The /guardrails/test_custom_code endpoint lets an authenticated user submit custom Python code to test a guardrail. The server tries to block dangerous operations with a regex-based filter, but the filter works on source code only.
X41 D-Sec researchers showed that the filter can be bypassed by assembling blocked attribute names from string fragments and rewriting CPython bytecode. The attacker then runs arbitrary commands with the privileges of the LiteLLM process — root in the default Docker image. Exploitation requires low-privileged authentication (CVSS vector PR:L), such as a proxy API key.
According to NVD, LiteLLM versions from 1.81.8 up to (but not including) 1.83.10 are affected. The component also ships in Red Hat products — NVD lists Ansible Automation Platform, OpenShift AI and OpenShift Lightspeed, and Red Hat has released errata for them. CISA added the vulnerability to the KEV catalog on 18 November 2026, which means active exploitation has been confirmed.
Required Actions
- Update LiteLLM to version 1.83.10 or later (affected range according to NVD: 1.81.8 up to, but not including, 1.83.10).
- If you use Red Hat Ansible Automation Platform, OpenShift AI or OpenShift Lightspeed, apply the Red Hat errata for CVE-2026-40217 (including RHSA-2026:24866 and RHSA-2026:30056).
- Until you update, block the
/guardrails/test_custom_codepath on the reverse proxy and restrict access to the LiteLLM API to trusted networks. - Review issued proxy API keys and revoke unnecessary ones — any authenticated user can exploit the flaw.
- If the proxy was reachable from the internet, treat it as a possible incident: review requests to the guardrail endpoint, processes and outbound connections from the container, and rotate LLM provider keys stored in the configuration.
CISA set a remediation deadline of 2 December 2026 for US federal agencies.
Who Is Affected?
Organizations running LiteLLM (BerriAI) as a gateway to language models — standalone, in a container or as part of AI platforms — and users of Red Hat products that include LiteLLM (Ansible Automation Platform, OpenShift AI, OpenShift Lightspeed). Also check development and data science environments, where LiteLLM is often deployed outside the central IT inventory.
Sources
- NVD - CVE-2026-40217
- X41 D-Sec - advisory X41-2026-001
- Red Hat - CVE-2026-40217
- CISA KEV Catalog
- FIRST EPSS
Need help securing your systems? nFlo team offers vulnerability management and 24/7 SOC services. Contact us.
