Cyber Posture

CVE-2026-40217

HighPublic PoC

Published: 10 April 2026

Published
10 April 2026
Modified
27 April 2026
KEV Added
Patch
CVSS Score 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.0024 47.2th percentile
Risk Priority 18 60% EPSS · 20% KEV · 20% CVSS

Description

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

Mitigating Controls (NIST 800-53 r5)AI

prevent

Directly remediates the bytecode rewriting vulnerability in LiteLLM by applying patches or upgrades as recommended in the x41-dsec advisory.

prevent

Prevents exploitation by configuring LiteLLM to disable the unnecessary /guardrails/test_custom_code URI and other non-essential functions.

prevent

Blocks arbitrary code execution by validating and sanitizing all inputs submitted to the /guardrails/test_custom_code endpoint to prevent bytecode rewriting.

Security SummaryAI

CVE-2026-40217 is a critical vulnerability in LiteLLM versions through 2026-04-08 that enables remote attackers to execute arbitrary code through bytecode rewriting at the /guardrails/test_custom_code URI. Classified under CWE-420, it carries a CVSS v3.1 base score of 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H), indicating high severity due to its potential for significant impact across confidentiality, integrity, and availability.

The vulnerability can be exploited by remote attackers with low privileges over the network, requiring low attack complexity and no user interaction. Successful exploitation grants attackers the ability to execute arbitrary code on the affected system, potentially leading to full compromise including data theft, modification, or disruption of services.

The primary advisory from x41-dsec, available at https://www.x41-dsec.de/lab/advisories/x41-2026-001-litellm/, provides further details on the issue. Security practitioners should consult this reference for recommended mitigations and patches.

Details

CWE(s)

Affected Products

litellm
litellm
≤ 2026-04-08

MITRE ATT&CK Enterprise TechniquesAI

T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
Why these techniques?

The vulnerability allows remote code execution via a specific URI in LiteLLM, a network-exposed service, directly mapping to exploitation of public-facing applications.

Confidence: HIGH · MITRE ATT&CK Enterprise v19.0

References