CVE-2026-40217: LiteLLM guardrail sandbox escape enables code execution, added to CISA KEV
Article Content
- •CVE-2026-40217 allows sandbox escape and arbitrary code execution in LiteLLM via /guardrails/test_custom_code, requiring only low-privilege or authenticated access.
- •CISA added the flaw to the KEV catalog on 2026-11-18, with federal remediation due 2026-12-02, after Zenity Labs observed abuse.
- •A public PoC and Nuclei template exist; the exploit is reported to yield root code execution in some deployments.
- •LiteLLM stores provider API keys, so compromise can expose model credentials; rotate keys on any unpatched exposed instance.
- •LiteLLM is bundled in Red Hat Ansible Automation Platform 2.6, OpenShift AI 3.3 and Lightspeed Core; apply errata RHSA-2026:24866 and RHSA-2026:30056.
CVE-2026-40217 is a bytecode-rewriting sandbox escape in BerriAI LiteLLM's guardrail "test custom code" feature, reachable via POST /guardrails/test_custom_code, allowing arbitrary code execution in the LiteLLM process (reported running as root in some deployments). The flaw was disclosed on 2026-04-10 and rated CVSS 8.8 (high); Red Hat rates it Important, noting it requires authenticated, administrative-level access to the proxy endpoints. FortiGuard reports the attacker needs only low-privilege access such as a valid API key or low-tier account, which is common in multi-tenant AI gateways. Zenity Labs reportedly observed threat actors abusing the guardrail tester to run code as root, and CISA added the flaw to its Known Exploited Vulnerabilities catalog on 2026-11-18 with remediation due 2026-12-02. A public proof-of-concept appeared on 2026-05-19 and a Nuclei template exists. Because LiteLLM stores and brokers provider API keys, code execution there can expose those keys and the surrounding environment. LiteLLM is also bundled in Red Hat Ansible Automation Platform 2.6, OpenShift AI 3.3 and Lightspeed Core, so exposure may exist without a direct LiteLLM deployment. Red Hat errata RHSA-2026:24866 and RHSA-2026:30056 address the bundled products, and FortiGuard IPS signature 62918 is available. Sources differ on exact fixed-version cut-offs, which should be confirmed against vendor advisories.
Ask AI about this cluster
Answers cite the sources they use
Timeline
More articles in this cluster (3)
Following this threat?
Track BerriAI and CVE-2026-40217 in your own feed — you're alerted when they show up in new reporting, leak sites or exploitation.
Free account · no card needed
Common questions
Am I affected if I don't run LiteLLM directly?
How urgent is this?
What should I do first?
Continue Reading
Google Reports First Fully Autonomous AI Cyberattack Using exploit_agent Google's Threat Intelligence Group (GTIG) has identified the first instance of an autonomous AI framework, named exploit_agent, that can fully automate the process of discovering and exploiting software vulnerabilities without human intervention. This framework continuously compares code before and after security…