LiveActive security incident?Get immediate response
CVE Record

CVE-2026-40217: LiteLLM through 2026-04-08 allows remote attackers to execute arbitrary code via bytecode rewriting at the...

LiteLLM through 2026-04-08 allows remote attackers to execute arbitrary code via bytecode rewriting at the /guardrails/test_custom_code URI.

HighCVSS 8.8Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

CVE-2026-40217 is a high-severity LiteLLM issue that can let a low-privileged remote user execute code through the custom guardrails test endpoint. For businesses, the main concern is compromise of systems running LiteLLM, including possible access to model gateway secrets, data, or downstream services.

Executive priority

Prioritize within normal high-severity remediation windows, faster for internet-facing or multi-user LiteLLM deployments. Treat exposed model gateway infrastructure as sensitive because compromise may affect credentials, data flows, and connected AI services.

Technical view

The CVE describes arbitrary code execution in BerriAI LiteLLM through 2026-04-08 via bytecode rewriting at `/guardrails/test_custom_code`. The CVSS 3.1 score is 8.8 with network access, low attack complexity, low privileges, no user interaction, and high confidentiality, integrity, and availability impact.

Likely exposure

Exposure is most likely where LiteLLM is deployed and the `/guardrails/test_custom_code` route is reachable by low-privileged authenticated users. The bundle lists a specific affected commit hash and an unknown default status, so version mapping requires local verification.

Exploitation context

The source bundle does not show CISA KEV listing or confirmed active exploitation. Public references include an X41 advisory and Red Hat tracking, but the provided data does not establish exploitation in the wild.

Researcher notes

Evidence is strong for the vulnerability class, endpoint, and CVSS characteristics, but incomplete for fixed upstream versions, default exposure, exploit maturity, and product packaging impact. Avoid assuming all LiteLLM deployments are exploitable without route and privilege validation.

Mitigation direction

  • Review X41, BerriAI, and Red Hat guidance for fixed versions or package updates.
  • Upgrade LiteLLM or Red Hat packages when vendor-fixed releases apply.
  • Restrict access to LiteLLM administrative and guardrail testing routes.
  • Remove unnecessary low-privilege access to custom code testing features.
  • Monitor LiteLLM hosts for unexpected process execution or configuration changes.

Validation and detection

  • Inventory LiteLLM deployments and identify versions or commit hashes in use.
  • Check whether `/guardrails/test_custom_code` is exposed to authenticated users.
  • Confirm whether Red Hat advisories apply to deployed packages.
  • Review access logs for use of the affected route.
  • Validate that updated deployments no longer match the affected build.
Prepared
Confidence
medium
Sources
8

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-420: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cwe · medium confidence lookup

CWE-94: Code execution behavior lookup

Code execution and unsafe deserialization weaknesses often justify reviewing execution behavior and process telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-40217 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
8.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

2CVSS vectors
5Timeline events
2ADP providers
7Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: noTechnical Impact: total

CVSS vector scores

2 official scores

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
8.8CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H2.85.9mitre
8.8CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H2.85.9redhat-SADP

Vulnerability scoring details

Base CVSS 3.1 score

8.8High
CVSS 3.1 vector shape for CVE-2026-40217Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. ADP timelineredhat-SADP

    Made public.

  3. CVE publishedCVE Program

    The CVE record was published.

  4. ADP timelineredhat-SADP

    Reported to Red Hat.

  5. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc
redhat-SADPLiteLLM: LiteLLM: Arbitrary Code Execution via bytecode rewriting
other:Red Hat severity ratingcvssV3_1
  • 2026-04-10T15:01:29.063Z: Reported to Red Hat.
  • 2026-04-10T13:43:23.147Z: Made public.

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
BerriAILiteLLMbb0639701796218a3447160e55c0f1097446e4e6085df7dfd39f476d4143743funknown
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.