All CVEs

LiteLLM CVE-2026-40217: a sandbox escape in the proxy's /guardrails/test_custom_code endpoint lets anyone with an admin key run commands, as root in the default Docker image. Public PoC, attempts seen, added to CISA KEV on 18 Nov (due 2 Dec). Affected: 1.81.8 through 1.83.10. Upgrade to at least 1.106.9, 1.108.6 or 1.109.1, since later releases had their own admin-takeover bugs. Until then, block that endpoint and rotate any weak master key. Check with `pip show litellm`. https://tldrcve.com/litellm/

BerriAI LiteLLM proxy · CVE-2026-40217

LiteLLM RCE

Patch nowIn CISA KEV, due 2 Dec. Public PoC, needs admin key.

LiteLLM's proxy has an endpoint for testing custom guardrail code, and its home-made sandbox can be escaped to run any command, as root in the default Docker image. It needs a proxy-admin key, but attackers have been guessing default keys, and two other bugs let ordinary users become admin on older versions.

How scary is it?

updated 20 Nov
  • No: Needs a LiteLLM admin key first3,4
  • Yes: Public exploit code is out4
  • Yes: Attacks seen in the wild1,5
  • Yes: On CISA's exploited list (fix by 2 Dec)1,2

Scare-o-meter

Drop everything

Attackers are already on it.
Patch now.

Are you affected? only if all are true

1LiteLLM 1.81.8 – 1.83.10command

GitHub's advisory lists >= 1.81.8, < 1.83.10 as affected, but its text says the fix is in 1.83.11, so count 1.83.10 as affected to be safe. Only the proxy server is at risk, not plain use of the Python SDK. In Docker, image tags don't reliably match versions (main-latest tells you nothing), so check the pip version inside the container.3,5

pip show litellm
2Management API is reachablecommand

The attacker can reach the proxy's management API, including POST /guardrails/test_custom_code. Keep it off untrusted networks.3,4

docker ps --format '{{.Names}} {{.Image}}' | grep -i litellm
3Attacker has an admin key

The default config requires a proxy-admin credential (the master key). These also count: a weak key like sk-1234; no master key at all (callers are treated as admin); any user account below 1.83.14 (CVE-2026-47101/47102) or on 1.91.0 up to the CVE-2026-114612 fix; Enterprise-licensed proxies below 1.106.5, which can leak the master key to anyone; and proxies below 1.106.9 with an Azure model but no Azure API key set, where any logged-in user can read the master key.3,5,6,7,11,12,13,16

What to do

1Upgrade to the newest on your line

1.83.11 fixed this sandbox escape, but later releases had their own admin-takeover bugs. Use at least 1.106.9, 1.108.6 or 1.109.1 (listed below). These also cover the older LiteLLM KEV entries CVE-2026-42208 and CVE-2026-42271 (fixed 1.83.7) and CVE-2026-59822 (fixed 1.84.0).3,11,12,16,14,15,10

Latest safe versions checked 20 Nov

LiteLLM → 1.1101.110.11.1091.109.21.108 (LTS)1.108.121.1061.106.11Releases older than 1.106 have no fix: move up.
2Until then: block the endpoint

Block POST /guardrails/test_custom_code at your reverse proxy or API gateway. Keep the admin port off the internet. If you use Azure models, also block the fields tenant_id, client_id, client_secret, azure_username, azure_password and azure_scope in request bodies.3,4,16

3Rotate a weak or old master key

Attackers sprayed default-style keys at this endpoint. If yours is guessable or was exposed, replace it. The escape exposes provider and cloud keys stored in the proxy, so rotate those too.5

4Run the container as non-root

The default image runs as root, so a sandbox escape gets root. LiteLLM also ships a non-root image.3,5

This page shows you how to check. It can't tell you you're safe.

Sources (17) and changelog
  1. CISA KEV: CVE-2026-40217 added 18 Nov, due 2 Dec 18 Nov
  2. CISA alert: four KEV additions incl. LiteLLM 18 Nov
  3. LiteLLM GHSA-wxxx-gvqv-xp7p: versions, auth, workaround 7 May
  4. X41 D-Sec: original advisory and PoC 8 Apr
  5. Zenity Labs: in-the-wild attempts, key spraying 30 Jun
  6. GHSA-qrc4-49gv-mv9m: CVE-2026-47101, fixed 1.83.14 21 May
  7. GHSA-wpfp-gwwc-vwq6: CVE-2026-47102, fixed 1.83.10 21 May
  8. LiteLLM v1.83.10-stable release: Docker tag format 27 Apr
  9. NVD: CVE-2026-40217
  10. LiteLLM GHSA-7488-6r32-c95q: CVE-2026-59822, fixed 1.84.0 30 Jun
  11. LiteLLM GHSA-7hp6: CVE-2026-114612, user to admin on 1.91.0+
  12. LiteLLM GHSA-w4c7: master key leak, fixed 1.106.5
  13. LiteLLM GHSA-72m8: no master key means admin
  14. LiteLLM GHSA-r75f: CVE-2026-42208, fixed 1.83.7
  15. LiteLLM GHSA-v4p8: CVE-2026-42271, fixed 1.83.7
  16. LiteLLM GHSA-2rwg: master key leak via Azure models, fixed 1.106.9 12 Nov
  17. PyPI: LiteLLM release history