CVE-2026-40217
highpriority · track · 15EPSS 0.155 · 97 %ileexploit · PoCDEEURUUSEPSS · scored 2026-10-26
LiteLLM through 2026-04-08 allows remote attackers to execute arbitrary code via bytecode rewriting at the /guardrails/test_custom_code URI.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
exploits (1)
Public proof-of-concept and weaponised exploit code.
affected products (8)
Products and version ranges known to be affected.
- Red Hat Ansible Automation Platform 2.6all versionscert_bundDEcpe:/a:redhat:ansible_automation_platform:2.6
advisories (3)
Vendor and ecosystem advisories describing this.
- WID-SEC-W-2026-1408LiteLLM: Schwachstelle ermöglicht Ausführen von beliebigem Programmcode mit AdministratorrechtenDeutsch2026-05-06csaf · cert_bundDE
Ein entfernter, authentisierter Angreifer kann eine Schwachstelle in LiteLLM ausnutzen, um beliebigen Programmcode mit Administratorrechten auszuführen.
- GHSA-wxxx-gvqv-xp7pLiteLLM has a sandbox escape in custom-code guardrail2026-05-11ghsa · osvUS
### Impact The `POST /guardrails/test_custom_code` endpoint runs user-supplied Python inside a hand-rolled sandbox. The sandbox can be escaped using bytecode-level techniques, allowing arbitrary code execution in the proxy process — which runs as root in the default Docker image. **Reaching the endpoint requires a proxy-admin credential** in default configurations. ### Patches Fixed in **`1.83.11`**. The hand-rolled sandbox has been replaced with `RestrictedPython`. Upgrade to `1.83.11` or later. ### Workarounds If upgrading is not immediately possible, block `POST /guardrails/test_custom_code` at your reverse proxy or API gateway. ### References - Patched release: [`v1.83.10-stable`](https://github.com/BerriAI/litellm/releases/tag/v1.83.10-stable)
- PYSEC-2026-2601LiteLLM has a sandbox escape in custom-code guardrail2026-07-13vendor · osvUS
### Impact The `POST /guardrails/test_custom_code` endpoint runs user-supplied Python inside a hand-rolled sandbox. The sandbox can be escaped using bytecode-level techniques, allowing arbitrary code execution in the proxy process — which runs as root in the default Docker image. **Reaching the endpoint requires a proxy-admin credential** in default configurations. ### Patches Fixed in **`1.83.11`**. The hand-rolled sandbox has been replaced with `RestrictedPython`. Upgrade to `1.83.11` or later. ### Workarounds If upgrading is not immediately possible, block `POST /guardrails/test_custom_code` at your reverse proxy or API gateway. ### References - Patched release: [`v1.83.10-stable`](https://github.com/BerriAI/litellm/releases/tag/v1.83.10-stable)
also known as (8)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (9)
External citations — patches, advisories, analysis.
- https://github.com/BerriAI/litellm/releasesPatchcnnvd
- https://www.x41-dsec.de/lab/advisories/x41-2026-001-litellm/cnnvd
- https://www.x41-dsec.de/lab/advisories/x41-2026-001-litellm/enisa_euvd
- https://access.redhat.com/errata/RHSA-2026:24866nvd
- https://access.redhat.com/errata/RHSA-2026:30056nvd
- https://access.redhat.com/security/cve/CVE-2026-40217nvd
- https://bugzilla.redhat.com/show_bug.cgi?id=2457301nvd
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40217.jsonnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan