ZeroDayAlert

CVE-2026-40217: BerriAI LiteLLM Unprotected Alternate Channel Vulnerability

BerriAI LiteLLM contains an unprotected alternate channel vulnerability that could allow remote attackers to execute arbitrary code via bytecode rewriting at the /guardrails/test_custom_code URI.

BerriAI LiteLLM Added to KEV 2026-11-18 Federal due 2026-12-02 Known ransomware use

Required action — quoted from CISA

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 discontinue use of the product if mitigations are unavailable. Stakeholders are responsible for evaluating each asset's internet exposure and ensuring adherence to BOD 26-04 patching guidelines.

Where this comes from. The identifier, product, dates and required action above are copied verbatim from the CISA Known Exploited Vulnerabilities catalog. The action plan below is written by an AI agent from that record and published automatically. AssurePort has not independently tested this vulnerability and makes no claim about whether any specific system is affected.

Who is affected

BerriAI LiteLLM is affected by this vulnerability. The flaw allows remote attackers to execute arbitrary code through bytecode rewriting at a specific URI endpoint. The record does not specify which versions of LiteLLM are vulnerable, nor does it clarify whether only cloud-hosted deployments, self-hosted instances, or both are affected.

How to check whether this touches you

  • Inventory your infrastructure for any deployment of BerriAI LiteLLM, including development, staging and production environments.
  • Determine whether the /guardrails/test_custom_code URI is reachable from networks outside your direct control, including the internet.
  • Check the LiteLLM version running on each instance; note that version strings alone are a signal of exposure risk—vendor backports and patch distributions vary by deployment method.
  • If LiteLLM is running as a cloud service or container, verify which release date and patch level you are on by consulting your cloud provider's or container registry's metadata.

What to do

  1. Contact BerriAI immediately to obtain vendor-specific mitigations and patch guidance; do not wait for a general security update if interim controls are available.
  2. If the /guardrails/test_custom_code endpoint is not required for your use case, restrict access to it at the network boundary (firewall, reverse proxy, or service mesh) until patching is complete.
  3. Enable detailed logging of all HTTP requests to the /guardrails/test_custom_code URI, capturing source IP, timestamp, request body, and response code; retain logs for at least 90 days.
  4. If patching is unavailable and the endpoint cannot be isolated, evaluate discontinuation of LiteLLM in accordance with CISA BOD 26-04 guidance and your organisation's risk tolerance.
  5. Escalate to your security team and incident response lead if you cannot achieve either patching or network isolation within your remediation deadline.

If you find you were exposed

Review access logs for the /guardrails/test_custom_code URI backdating at least three to six months before disclosure. Look for requests with unusual payloads, repeated failed attempts, or successful requests from unexpected source IP ranges. If log retention is insufficient, work with your infrastructure team to recover archived logs from backup systems. Any evidence of exploitation should trigger a full code review and secrets rotation for the affected system.

Get these the morning they land.

One email, only when a vulnerability is newly confirmed as exploited — the CISA record plus our action plan. No more than one a day, and nothing on quiet days.

Knowing it exists is not the same as knowing you are exposed.

This page can tell you that CVE-2026-40217 is being exploited. It cannot tell you whether LiteLLM is running somewhere of yours that is reachable. That question is what a scan answers.

Check your own surface →