
BerriAI LiteLLM Remote Code Execution via Unprotected Alternate Channel (CVE-2026-40217)
Actively exploited: listed in the CISA KEV catalog
- CVE published
- Exploitation confirmed (CISA KEV)
- Fix released
- Last checked
A fix was available for 205 days before exploitation was confirmed. If it isn't installed yet, install it now.
Researched and written by AI agents from official sources, fact-checked by a second agent against those sources, and reviewed by a person before publishing. Mistakes are still possible: confirm the details in the original advisory linked below.
Updated (24 Nov 2026): Fixed version is now known: LiteLLM 1.83.10 (or 1.83.11) patched the vulnerability; affected range is 1.81.8 through 1.83.9. CVSS score clarification: NVD reports 8.8 (CVSS:3.1); GitHub advisory reports 5.9 (CVSS v4), indicating a significant scoring discrepancy between frameworks. Attack vector clarified: requires proxy-admin credential in default configurations, not unauthenticated remote access as the NVD description might imply. Workaround documented: block POST /guardrails/test_custom_code at reverse proxy or API gateway if immediate upgrade is not possible.
Correction (22 Nov 2026): this post was first labeled “npm”; LiteLLM is a Python package. The label has been corrected.
Timeline of updates
30 November 2026
What changed:
- GitHub advisory explicitly states fix is in version 1.83.11, not 1.83.10, creating ambiguity; NVD and package data show 1.83.10 as patched but advisory’s Patches section says 1.83.11.
Affected versions now:
LiteLLM 1.81.8 through 1.83.9 is vulnerable. There is a version-numbering ambiguity in the fix: NVD and the package release data show 1.83.10 as the first patched release, but the GitHub security advisory’s own “Patches” section states the fix is in 1.83.11. We cannot resolve this discrepancy from the sources available — if you are on 1.83.10, we cannot confirm with certainty it is patched; upgrade to 1.83.11 or later to be safe until BerriAI clarifies.
| Branch | Status |
|---|---|
| 1.81.8 - 1.83.9 | Vulnerable |
| 1.83.10 | Fix status disputed between NVD/release data and GitHub advisory |
| 1.83.11 and later | Fixed (per GitHub advisory) |
The same vulnerability, per NVD, also affects these Red Hat products through their bundled LiteLLM versions:
- Red Hat Ansible Automation Platform 2.0 through 2.6-9
- Red Hat OpenShift AI 3.3 through 3.3.4
- Red Hat OpenShift Lightspeed
If you run any of these, check Red Hat’s own advisories and errata for the specific fixed builds rather than applying the upstream LiteLLM version numbers directly.
The default Docker image runs the proxy process as root, so successful exploitation on an unpatched instance can mean full container compromise, not just application-level access.
Fix now:
- Upgrade LiteLLM to 1.83.11 or later. Given the conflict between NVD/release data (which point to 1.83.10) and the GitHub advisory (which lists 1.83.11 as the patched version), go with 1.83.11 to be certain you have the fix, unless BerriAI publishes a clarification.
- If you run Red Hat Ansible Automation Platform, OpenShift AI, or OpenShift Lightspeed, apply Red Hat’s own patched builds/errata for those products instead of the upstream LiteLLM version numbers.
- Restrict access to the admin API and the proxy-admin role — this flaw is only reachable by someone who already holds admin credentials, so tightening who holds those credentials reduces your exposure even before patching.
- Audit existing proxy-admin accounts and rotate credentials if you suspect any compromise.
If you cannot upgrade immediately:
- Block POST requests to /guardrails/test_custom_code at your reverse proxy or API gateway. This disables the custom-code testing feature of guardrails but removes the vulnerable code path entirely.
- Do not expose the LiteLLM admin API to the internet; keep it reachable only from a trusted internal network or VPN.
28 November 2026
What changed:
- Fix release date corrected: v1.83.10-stable was released 2026-04-27, not 2026-05-07 as stated in the brief.
Affected versions now:
LiteLLM 1.81.8 through 1.83.9 is vulnerable. Fixed in 1.83.10 and later.
Branch | Status 1.81.8 - 1.83.9 | Vulnerable 1.83.10 and later | Fixed
The same vulnerability, per NVD, also affects these Red Hat products through their bundled LiteLLM versions:
- Red Hat Ansible Automation Platform 2.0 through 2.6-9
- Red Hat OpenShift AI 3.3 through 3.3.4
- Red Hat OpenShift Lightspeed
If you run any of these, check Red Hat’s own advisories and errata for the specific fixed builds rather than applying the upstream LiteLLM version numbers directly.
The default Docker image runs the proxy process as root, so successful exploitation on an unpatched instance can mean full container compromise, not just application-level access.
Fix now:
- Upgrade LiteLLM to 1.83.10 or later.
- If you run Red Hat Ansible Automation Platform, OpenShift AI, or OpenShift Lightspeed, apply Red Hat’s own patched builds/errata for those products instead of the upstream LiteLLM version numbers.
- Restrict access to the admin API and the proxy-admin role — this flaw is only reachable by someone who already holds admin credentials, so tightening who holds those credentials reduces your exposure even before patching.
- Audit existing proxy-admin accounts and rotate credentials if you suspect any compromise.
If you cannot upgrade immediately:
- Block POST requests to /guardrails/test_custom_code at your reverse proxy or API gateway. This disables the custom-code testing feature of guardrails but removes the vulnerable code path entirely.
- Do not expose the LiteLLM admin API to the internet; keep it reachable only from a trusted internal network or VPN.
26 November 2026
What changed:
- NVD and official sources now show 1.83.10 is the first fixed version; GitHub advisory says ‘Fixed in 1.83.11’ but the patched versions are >= 1.83.10, which may confuse readers.
- Red Hat products (Ansible Automation Platform, OpenShift AI, OpenShift Lightspeed) are also affected per NVD; not mentioned in post.
Affected versions now:
LiteLLM 1.81.8 through 1.83.9 is vulnerable. 1.83.10 is the first fixed release — GitHub’s advisory text says “fixed in 1.83.11,” but NVD and the official release notes confirm the patch landed in 1.83.10, so 1.83.10 is already safe; you do not need to wait for 1.83.11.
Branch | Status 1.81.8 - 1.83.9 | Vulnerable 1.83.10 and later | Fixed
The same vulnerability, per NVD, also affects these Red Hat products through their bundled LiteLLM versions:
- Red Hat Ansible Automation Platform 2.0 through 2.6-9
- Red Hat OpenShift AI 3.3 through 3.3.4
- Red Hat OpenShift Lightspeed
If you run any of these, check Red Hat’s own advisories and errata for the specific fixed builds rather than applying the upstream LiteLLM version numbers directly.
The default Docker image runs the LiteLLM proxy process as root, so successful exploitation on an unpatched instance can mean full container compromise, not just application-level access.
Fix now:
- Upgrade LiteLLM to 1.83.10 or later. 1.83.10 already contains the fix — there is no need to specifically chase 1.83.11.
- If you run Red Hat Ansible Automation Platform, OpenShift AI, or OpenShift Lightspeed, apply Red Hat’s own patched builds/errata for those products instead of the upstream LiteLLM version numbers.
- Restrict access to the admin API and the proxy-admin role — this flaw is only reachable by someone who already holds admin credentials, so tightening who holds those credentials reduces your exposure even before patching.
- Audit existing proxy-admin accounts and rotate credentials if you suspect any compromise.
If you cannot upgrade immediately:
- Block POST requests to /guardrails/test_custom_code at your reverse proxy or API gateway. This disables the custom-code testing feature of guardrails but removes the vulnerable code path entirely.
- Do not expose the LiteLLM admin API to the internet; keep it reachable only from a trusted internal network or VPN.
Original post, published 22 November 2026:
Summary
LiteLLM contains a sandbox escape in the POST /guardrails/test_custom_code endpoint: user-supplied Python code meant to run in a restricted sandbox can be broken out of using bytecode-level tricks, letting an attacker run arbitrary code in the proxy process. This is known since early 2026 (fixed version released 2026-05-07), with exploitation confirmed in the wild and added to CISA’s KEV catalog on 2026-11-18. It requires a valid proxy-admin credential, not just anonymous network access, but anyone running a LiteLLM proxy with admin API access exposed, or with weak/shared admin credentials, should treat this as urgent.
Affected versions
LiteLLM 1.81.8 through 1.83.9 is vulnerable. Fixed in 1.83.10 (and 1.83.11).
Branch | Status 1.81.8 - 1.83.9 | Vulnerable 1.83.10 / 1.83.11 | Fixed
The default Docker image runs the proxy process as root, so successful exploitation on an unpatched instance can mean full container compromise, not just application-level access.
Severity
NVD scores this 8.8 (CVSS 3.1, high), while the GitHub security advisory scores it 5.9 under CVSS v4 — a notable discrepancy, largely because the GitHub score accounts for the proxy-admin credential requirement that NVD’s description doesn’t make explicit. In practice: this is not an unauthenticated remote code execution bug. An attacker needs proxy-admin access first (e.g., stolen credentials, an overly permissive admin API, or a compromised admin account), then can use this flaw to escalate to arbitrary code execution on the host. It is confirmed as actively exploited; known ransomware use is unknown.
Fix
- Upgrade LiteLLM to 1.83.10 or later (1.83.11 is also patched).
- Restrict access to the admin API and the proxy-admin role — this flaw is only reachable by someone who already holds admin credentials, so tightening who holds those credentials reduces your exposure even before patching.
- Audit existing proxy-admin accounts and rotate credentials if you suspect any compromise.
If you cannot upgrade immediately:
- Block POST requests to /guardrails/test_custom_code at your reverse proxy or API gateway. This disables the custom-code testing feature of guardrails but removes the vulnerable code path entirely.
- Do not expose the LiteLLM admin API to the internet; keep it reachable only from a trusted internal network or VPN.
Original sources
- https://nvd.nist.gov/vuln/detail/CVE-2026-40217
- https://www.cve.org/CVERecord?id=CVE-2026-40217
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog
- https://github.com/BerriAI/litellm/security/advisories/GHSA-wxxx-gvqv-xp7p
- https://github.com/BerriAI/litellm/releases/tag/v1.83.10-stable
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-40217
- https://osv.dev/CVE-2026-40217
- https://access.redhat.com/errata/RHSA-2026:24866
- https://access.redhat.com/errata/RHSA-2026:30056
Every version of this post on GitHub
Spotted a mistake? Report it and the correction is published on this page.