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
- 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.
Workarounds
If upgrading is not immediately possible, block POST /guardrails/test_custom_code at your reverse proxy or API gateway.
Affected software
| Software | Affected versions |
|---|---|
LiteLLMServers and applications · cpe:a:litellm:litellm |
|
LiteLLMServers and applications · github:berriai/litellm |
|
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]
- 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
Vulnerabilities in LiteLLM
- In our list
- 47
- Published in the last 12 months
- 34
- Critical, last 12 months
- 6
- High, last 12 months
- 10
- Known exploited
- 5
- GHSA-2rwg-2wh4-7c4fAuthenticated secret exfiltration via Azure Entra credential parameters in the request bodyHigh 7.7 12 Nov 2026
- GHSA-w4c7-34wj-hqm8Unauthenticated file read leaks master key on Enterprise proxyCritical 10.0 27 Oct 2026
- CVE-2026-108575BerriAI LiteLLM Secret Resolution main.py get_secret improper authorizationMedium 5.3 11 Oct 2026
- CVE-2026-108574BerriAI LiteLLM Spend Tracking spend_management_endpoints.py ui_view_session_spend_logs authorizationMedium 5.3 11 Oct 2026
- GHSA-g5ff-637f-6q2minternal_user_viewer arbitrary local file read via `vertex_ai_credentials`High 8.1 1 Oct 2026
- GHSA-hhww-mrg2-969hReflected XSS in /sso/debug/callbackMedium 6.8 30 Sept 2026
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