Cyber Resilience

CVE-2026-40217

RCE in Litellm ≤ 2026-04-08

Public PoCRCE
Published
10 April 2026
Modified
15 July 2026
Patch / advisory
CVSS Score v3.1 8.8
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.065 93th percentile
Risk Priority 71 floored blend · peak EPSS

Summary

CVE-2026-40217 is a high-severity Unprotected Alternate Channel (CWE-420) vulnerability in Litellm Litellm. Its CVSS base score is 8.8 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Fallback Channels (T1008); ranked in the top 7% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SC-8 (Transmission Confidentiality and Integrity) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

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.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1008 Fallback Channels Command And Control
Adversaries may use fallback or alternate communication channels if the primary channel is compromised or inaccessible in order to maintain reliable command and control and to avoid data transfer thresholds.
T1048 Exfiltration Over Alternative Protocol Exfiltration
Adversaries may steal data by exfiltrating it over a different protocol than that of the existing command and control channel.
T1048.003 Exfiltration Over Unencrypted Non-C2 Protocol Exfiltration
Adversaries may steal data by exfiltrating it over an un-encrypted network protocol other than that of the existing command and control channel.
T1059 Command and Scripting Interpreter Execution
Adversaries may abuse command and script interpreters to execute commands, scripts, or binaries.
T1059.001 PowerShell Execution
Adversaries may abuse PowerShell commands and scripts for execution.
T1059.002 AppleScript Execution
Adversaries may abuse AppleScript for execution.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2024-6825Same product: Litellm Litellm
CVE-2026-59821Same product: Litellm Litellm
CVE-2024-5751Same product: Litellm Litellm
CVE-2024-4889Same product: Litellm Litellm
CVE-2026-42203Same product: Litellm Litellm
CVE-2024-9606Same product: Litellm Litellm
CVE-2026-47101Same product: Litellm Litellm
CVE-2026-47102Same product: Litellm Litellm
CVE-2026-12797Same product: Litellm Litellm
CVE-2026-12770Same product: Litellm Litellm

Affected Assets

litellm
litellm
≤ 2026-04-08

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V1.3.1

Mitigating Controls (NIST 800-53 r5) AI

Developer testing and evaluation finds code paths that accept and execute externally influenced strings.

Transmission confidentiality and integrity requirements apply to all transmitted data, preventing weaker protection on secondary channels.

Input validation directly stops untrusted data from being used to construct executable code without neutralization.

Information flow enforcement requires consistent authorization and control over every path, directly stopping unequal protection of alternate channels.

Least privilege limits the damage an injected code fragment can perform once executed.

Requiring documented secure development standards and tools enforces use of safe code-generation APIs and escaping.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.DS-02 mostly match
prevents

Protecting all data-in-transit directly mitigates unequal channel protection though the control addresses broader transit scenarios.

PR.IR-01 mostly match
prevents

Network protection from unauthorized access inherently requires securing every channel, not just primaries.

PR.PS-06 mostly match
prevents

PR.PS-06's SDLC practices directly target injection flaws via secure coding and testing (mostly), yet as a single broad outcome it leaves many code-generation specifics unaddressed (partial).

DE.CM-01 partial match
prevents

Network monitoring can surface use of unprotected alternate channels but does not prevent the design flaw.

PR.DS-10 none match
prevents

PR.DS-10 protects runtime data confidentiality/integrity but has no bearing on neutralizing externally influenced input during code generation, so neither direction shows any preventive effect.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

prevents

Access restrictions may cover primary paths but leave alternate channels unprotected unless explicitly extended.

prevents

Secure authentication applies to primary channels but does not ensure alternate channels receive the same strength.

mitigates

Network security controls ensure all channels receive equivalent protection, directly addressing unprotected alternate channels.

prevents

Security of network services requires consistent protection across all service channels, mitigating alternate-channel weaknesses.

mitigates

Network segregation can reduce exposure of alternate channels but does not guarantee equivalent protection levels.

prevents

Banning unapproved code samples and unauthenticated web services, combined with secure-coding standards and SAST, prevents the dynamic generation or inclusion of attacker-supplied code.

References