CVE-2026-40217
published high CVSS 3.1 · 8.8LiteLLM: Arbitrary Code Execution via bytecode rewriting
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| BerriAI | — | LiteLLMbb0639701796218a3447160e55c0f1097446e4e6085df7dfd39f476d4143743f · Other versions: unknown | Affected | Not stated | mitre |
| Red Hat | — | ansible-automation-platform-26/lightspeed-chatbot-rhel9Red Hat Ansible Automation Platform 2.6 · 1780102732 and later · Other versions: affected | Unaffected | Not stated | redhat-SADP |
| Red Hat | — | rhoai/odh-llama-stack-core-rhel9Red Hat OpenShift AI 3.3 · 1782310008 and later · Other versions: affected | Unaffected | Not stated | redhat-SADP |
| Red Hat | — | redhat-user-workloads/lightspeed-stackLightspeed Core | Affected | Not stated | redhat-SADP |
| Red Hat | — | rhoai/odh-mlflow-rhel9Red Hat OpenShift AI (RHOAI) | Unaffected | Not required | redhat-SADP |
Description
LiteLLM through 2026-04-08 allows remote attackers to execute arbitrary code via bytecode rewriting at the /guardrails/test_custom_code URI.
A flaw was found in LiteLLM. A remote attacker can exploit this flaw by performing bytecode rewriting at the `/guardrails/test_custom_code` URI. This could lead to arbitrary code execution, allowing the attacker to run malicious code on the affected system.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 8.8 / 10
- Severity
- high
- Provider
- mitre · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: GENERAL
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 8.8 | high | redhat-SADP · adp | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| BerriAI | LiteLLM | bb0639701796218a3447160e55c0f1097446e4e6085df7dfd39f476d4143743f (affected · custom)Default: unknown | mitre · cna |
| Red Hat | Red Hat Ansible Automation Platform 2.6 | 1780102732 and later (unaffected · rpm)Default: affected | redhat-SADP · adp |
| Red Hat | Red Hat OpenShift AI 3.3 | 1782310008 and later (unaffected · rpm)Default: affected | redhat-SADP · adp |
| Red Hat | Lightspeed Core | Default: affected | redhat-SADP · adp |
| Red Hat | Red Hat OpenShift AI (RHOAI) | Default: unaffected | redhat-SADP · adp |
Weaknesses
2- CWE-420 CWE-420 Unprotected Alternate Channel
- CWE-94 Improper Control of Generation of Code ('Code Injection')
References
7- https://access.redhat.com/errata/RHSA-2026:24866
- https://access.redhat.com/errata/RHSA-2026:30056
- https://access.redhat.com/security/cve/CVE-2026-40217
- RHBZ#2457301 https://bugzilla.redhat.com/show_bug.cgi?id=2457301
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40217.json
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-40217
- https://www.x41-dsec.de/lab/advisories/x41-2026-001-litellm/
Provider assertions
3mitre · cna
redhat-SADP · adp
LiteLLM: LiteLLM: Arbitrary Code Execution via bytecode rewriting
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 31a0d448fe29816bfd688b1af285ba0cb45667c7a9452bb77bb73d637820acdf
- Ingested
- 19 Nov 2026, 16:54:24 UTC
- Source record
- Official CVE record