LiteLLM Guardrail Sandbox Escape Enables Authenticated Remote Code Execution
Emerging Technology Risk · 3 sources · Updated 16h ago · First seen Nov 19, 2026

A high-severity sandbox escape in BerriAI’s LiteLLM proxy allows authenticated users to execute arbitrary code through the /guardrails/test_custom_code endpoint. X41 D-Sec researcher Markus Vervier found that Python bytecode rewriting can bypass regex-based restrictions on submitted guardrail code, enabling command execution with the LiteLLM process’s privileges—root in the default Docker image. X41 rated the vulnerability CVSS 8.7 and confirmed it in a specific main-latest container image; its April advisory did not identify a patched version. Compromise could expose AI-provider credentials and other secrets accessible to the proxy.
A November 19 Shellcode report identifies the flaw as CVE-2026-40217 and says CISA added it to the Known Exploited Vulnerabilities catalog following active exploitation. The report alleges its use in LLMjacking campaigns involving stolen inference quotas, credential theft, and cryptomining, and names v1.83.14-stable or later as the complete fix. Those exploitation, catalog-listing, and remediation claims are not independently substantiated by the supplied primary advisory or telemetry. Operators should restrict access to the affected endpoint, verify remediation guidance with BerriAI, review endpoint access logs and AI billing for anomalies, and rotate potentially exposed credentials where compromise is suspected.


