Skip to main content
VulnerabilityPublished

CVE-2026-40217: LiteLLM Has a Sandbox Escape

Affects litellmSource GCVE Database

0
Authoritative record:CVE-2026-40217· High 8.8

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

CVSS 3.1 base score
8.8High
How severe the flaw is on the 0–10 CVSS scale.
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:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 10 Apr 2026

  2. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  3. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  4. Observed by OffSeq 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

ProductAffectedFixed in
PyPIlitellmAffected
  • >=1.81.8 <1.83.10
Fixed in
  • 1.83.10

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

Community reviews

Loading reviews…