All vulnerabilities

Servers and applications

CVE-2026-40217

Sandbox escape in custom-code guardrail

Actively exploited: CISA added it to its Known Exploited Vulnerabilities catalog on 18 Nov 2026.

Severity
High 8.8
Published
10 Apr 2026
Last changed
19 Nov 2026
Added to UpHeron
1 Nov 2026
Fixed in
1.83.10
Exploit chance
62% in the next 30 daysHigher than 99% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
CWE-420Code injection (CWE-94)Improper control of dynamically managed code (CWE-913)
Attack
Over the network · Needs a user account · No user action needed
Attacker can
Read data · Change data · Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Also known as
GHSA-wxxx-gvqv-xp7p
Sources
NVD, Project advisories (GitHub)

Description

The POST /guardrails/test_custom_code endpoint runs user-supplied Python inside a hand-rolled sandbox. The sandbox can be escaped using bytecode-level techniques, allowing arbitrary code execution in the proxy process — which runs as root in the default Docker image.

Reaching the endpoint requires a proxy-admin credential in default configurations.

From BerriAI/litellm's security advisory.

Workarounds

If upgrading is not immediately possible, block POST /guardrails/test_custom_code at your reverse proxy or API gateway.

Workarounds as given by BerriAI/litellm's security advisory.

Affected software

SoftwareAffected versions
LiteLLMServers and applications · cpe:a:litellm:litellm
  • From 1.81.8 before 1.83.10
LiteLLMServers and applications · github:berriai/litellm
  • From 1.81.8 before 1.83.10

About LiteLLM

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

From its GitHub repository.
Weekly downloads (PyPI)
23,483,590PyPI Stats, 15 Nov 2026
GitHub stars
63,271GitHub, 15 Nov 2026
Forks
13,287GitHub, 15 Nov 2026
Latest release
v1.109.1GitHub, 15 Nov 2026
Released
12 Nov 2026GitHub
First published on GitHub
27 Jul 2023GitHub

Known exploited

CISA name
BerriAI LiteLLM Unprotected Alternate Channel Vulnerability
Required action
Apply mitigations in accordance with vendor instructions, ensuring compliance with CISA’s BOD 26-04 Prioritizing Security Updates Based on Risk (see URL in Notes) guidance and CISA’s “Forensics Triage Requirements” (see URL in Notes). Follow applicable BOD 26-04 guidance for cloud services or…
Due for US agencies
2 Dec 2026
Used in ransomware
Not known

References

  • NVD https://nvd.nist.gov/vuln/detail/CVE-2026-40217
  • CVE.org https://www.cve.org/CVERecord?id=CVE-2026-40217
  • GitHub Advisory Database https://github.com/advisories/GHSA-wxxx-gvqv-xp7p
  • github.com https://github.com/BerriAI/litellm/security/advisories/GHSA-wxxx-gvqv-xp7p