home / blog
2026-11-24 · high
CVE-2026-40217: RCE in LiteLLM via bytecode rewriting
CVE-2026-40217: LiteLLM vulnerable to RCE via bytecode rewriting. Alert for defenders.

CVE-2026-40217 identifies a critical vulnerability in LiteLLM through version 2026-04-08, which allows a remote actor to execute arbitrary code via bytecode rewriting in the /guardrails/test_custom_code endpoint. The exploit leverages the guardrail sandbox to achieve root privileges execution in default Docker deployments.
The vulnerability has a CVSS score of 8.8, classified as 'high severity'. According to recent reports on GitHub from November 24, 2026, there are public repositories that claim to contain exploits for this vulnerability. It is noteworthy that despite the CVE being published in April, the risk remains current with available exploits.
IT teams and security leaders should immediately apply official patches released by the vendor. If immediate updating is not possible, it is recommended to disable the /guardrails/test_custom_code endpoint or implement network restrictions to limit access. Closely monitor suspicious activity that might indicate an attempt to exploit this vulnerability.
At a glance
- What
- Vulnerability allowing remote code execution via bytecode rewriting in LiteLLM's /guardrails/test_custom_code endpoint
- Severity
- High (CVSS 8.8)
- Affected versions
- LiteLLM through version 2026-04-08 (inclusive)
- Fix
- Not reported
- Status
- Published on 2026-04-10
- Action
- Update to the latest available version applying official patches
Sources: NVD, CVE-2026-40217