What changed
Confirmed exploitation, but a disputed starting point
On 18 November, CISA added CVE-2026-40217 to the Known Exploited Vulnerabilities catalog. The flaw is in LiteLLM's POST /guardrails/test_custom_code endpoint, where supplied Python can escape a custom sandbox and run in the proxy process. The vendor notes that the process runs as root in its default Docker image.
The access description needs care. CISA describes a remote code-execution path, while LiteLLM's advisory says a proxy-admin credential is required to reach the endpoint in default configurations. Neither statement establishes that every public LiteLLM proxy is directly exploitable without credentials. The vendor advisory also has inconsistent patch text: its version metadata starts at 1.83.10, but its narrative recommends 1.83.11 or later.
Use the vendor’s explicit upgrade instruction
Defender workflow
Scope the code path and its authority
- 1
Find deployed proxies. Inventory LiteLLM versions and deployments, including container images and development gateways. Confirm whether the custom-code guardrail endpoint is enabled and reachable.
- 2
Check who could invoke it. Review proxy-admin credentials, reverse-proxy rules and endpoint logs. Determine whether the service ran with elevated privileges or had access to provider keys and other secrets.
- 3
Upgrade and investigate. Move to the vendor-recommended fixed release. If the endpoint was exposed to untrusted callers, preserve logs and review suspicious proxy process activity and credential use.
Defender note
The proxy’s privilege changes the blast radius
An AI gateway often holds upstream provider credentials. If an investigation finds code execution in the proxy process, scope what that process could read and use; a patch alone cannot revoke a credential already exposed. Keep the access-condition discrepancy visible until CISA or the vendor clarifies it.