Advisories / who is affected and what to do

BerriAI LiteLLM: attackers can run arbitrary code via the guardrail test endpoint

CVE-2026-40217

MediumExploited in attacks Vulnerability disclosed Last updated

Summary

LiteLLM's POST /guardrails/test_custom_code endpoint lets an attacker run arbitrary code in the proxy process. Versions >= 1.81.8, < 1.83.10 of the litellm pip package are affected, and CISA lists the flaw as exploited. Upgrade to 1.83.11 or later, or block the endpoint until you can.

Who is affected

  • The litellm package (pip) is affected in versions >= 1.81.8, < 1.83.10.

How to check

  1. In default configurations, an attacker needs a proxy-admin credential to reach the endpoint.
  2. If you run the default Docker image, the proxy process runs as root. Code run by an attacker runs in that process.

What to do

  1. If you cannot upgrade right away, block POST /guardrails/test_custom_code at your reverse proxy or API gateway.
  2. Upgrade litellm to 1.83.11 or later.
  3. Choose 1.83.11 or later rather than 1.83.10. The same advisory also names 1.83.10 as the patched release, so its two statements differ. 1.83.11 or later meets both.
  4. If you find signs of misuse, treat the system as compromised: keep the logs, limit its access to the rest of your network, and change the passwords it held.

What we verified

Nothing in our own lab. This advisory was compiled automatically from the sources below. "Exploited in attacks" rests on the CISA list; we did not observe the attacks ourselves.

Update log

  • 28 November 2026, 13:11 UTC: Added to the website afterwards, compiled automatically.

Sources

You may quote this advisory if you name CyberScore and link to this page. How we establish facts: our sources and method.