CVE-2026-40217: LiteLLM Has a Sandbox Escape
Affects litellmSource GCVE Database
Not known to be exploited · public detection template (Nuclei) · CVSS 8.8 High : upgrade to 1.83.10 soon.
Data as of 27 Oct 2026, 00:41 UTC
- Patch
- Available – fixed in 1.83.10
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 10 Apr 2026
Detectable: evidence found.
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade litellm to 1.83.10.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| PyPIlitellm | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade LiteLLM to version 1.83.10 or later, where the vulnerability is fixed by replacing the sandbox implementation with RestrictedPython. If immediate upgrade is not feasible, block the POST /guardrails/test_custom_code endpoint at the reverse proxy or API gateway to prevent exploitation.
Description
LiteLLM versions from 1.81.8 up to but not including 1.83.10 contain a sandbox escape vulnerability in the custom-code guardrail feature. This flaw allows users with proxy-admin credentials to execute arbitrary code as root via the POST /guardrails/test_custom_code endpoint. The issue arises from a hand-rolled Python sandbox that can be bypassed using bytecode-level techniques. The vulnerability is fixed in version 1.83.10 by replacing the sandbox with RestrictedPython. Until patched, blocking access to the vulnerable endpoint is recommended.
References
- github.com/BerriAI/litellm/security/advisories/GHSA-wxxx-gvqv-xp7p (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-40217 (opens in a new tab)
- github.com/BerriAI/litellm (opens in a new tab)
- github.com/BerriAI/litellm/releases/tag/v1.83.10-stable (opens in a new tab)
- x41-dsec.de/lab/advisories/x41-2026-001-litellm (opens in a new tab)