← All posts

LiteLLM Security Updates on Azure Container Apps

If you run the LiteLLM proxy on Azure Container Apps, review and update it immediately. A high-severity vulnerability, CVE-2026-40217, in the LiteLLM custom-code guardrail lets a caller with a proxy-admin credential escape the guardrail sandbox and run arbitrary code in the proxy process. In the default LiteLLM Docker image, that process runs as root. The vulnerable endpoint is POST /guardrails/test_custom_code.

Affected: LiteLLM 1.81.8 and later, before 1.83.10. This includes the official ghcr.io/berriai/litellm images and any image you built that installs an affected litellm package. Versions earlier than 1.81.8 are not affected.

See the GitHub security advisory.

What you need to do

Update LiteLLM

Update to LiteLLM 1.83.10 or later, for example the v1.83.10-stable image. The fix replaces the custom sandbox with RestrictedPython. If you build your own image, update the litellm version in your requirements and rebuild.

Pin your image tag

Floating tags such as main-stable, main-latest and latest make it hard to confirm which LiteLLM version an app or job runs. Use a specific fixed release tag, or pin the image by digest.

Redeploy

Deploy the updated image, verify that all active app revisions use it, then deactivate vulnerable revisions. Updating the image in your registry alone is not enough. For jobs, update the image and stop any executions still using an affected image. See the deployment guidance and job execution guidance.

Confirm the running version

Run pip show litellm in the container console to confirm it reports 1.83.10 or later.

Review admin access

Reaching the vulnerable endpoint requires a proxy-admin credential in default configurations. Review who holds the LiteLLM master key and other admin keys. If you suspect unauthorized use, rotate the master key and the model provider API keys stored in the proxy.

Can’t update immediately?

As a temporary mitigation, block POST /guardrails/test_custom_code in the reverse proxy or API gateway in front of your app. Also consider restricting access to the proxy, for example with IP ingress restrictions or internal-only ingress, until you update. Temporary measures do not replace the security update.

Thank you, Microsoft Azure Container Apps Team