CVE-2026-40217
RCE in Litellm 1.81.8 – 1.83.10
Raw vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HCVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.
Summary
CVE-2026-40217 is a high-severity Unprotected Alternate Channel (CWE-420) vulnerability in Litellm. Its CVSS base score is 8.8 (High).
Operationally, exploitation aligns with the MITRE ATT&CK technique Exfiltration Over Bluetooth (T1011.001); ranked in the top 0.3% of CVEs by exploit likelihood; CISA has added it to the Known Exploited Vulnerabilities catalog; a public proof-of-concept is referenced.
The strongest mitigations our analysis identified map to AC-4 (Information Flow Enforcement) and AC-6 (Least Privilege) — 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)
Advisories
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2026-21376
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)
- KEV Date Added
- 18 November 2026
Related Threats
MITRE ATT&CK Enterprise Techniques
MITRE ATT&CK v20.0
CVEs Like This One
Affected Assets
Mitigating Controls
Control response
—
—
—
V1.3.1
Mitigating Controls (NIST 800-53 r5)
Our mappings, made for this CVE.
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.
Developer testing and evaluation finds code paths that accept and execute externally influenced strings.
Requiring documented secure development standards and tools enforces use of safe code-generation APIs and escaping.
Boundary protection mandates monitoring and control at all external and key internal interfaces, eliminating unprotected alternate channels.
Transmission confidentiality and integrity requirements apply to all transmitted data, preventing weaker protection on secondary channels.
Mitigating Controls (NIST CSF 2.0)
Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.
Protecting all data-in-transit directly mitigates unequal channel protection though the control addresses broader transit scenarios.
Network protection from unauthorized access inherently requires securing every channel, not just primaries.
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).
Network monitoring can surface use of unprotected alternate channels but does not prevent the design flaw.
Mitigating Controls (ISO/IEC 27001:2022 Annex A)
Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.
A.8.29's programme of code review, static analysis, dynamic testing and penetration testing is the complete pre-production discovery set for code injection: eval/dynamic-execution sinks are visible to SAST, code review catches them, and penetration testing reaches the externally exploitable instances, with no nameable remainder.
Training technical teams in secure coding practices (per A.6.3's education and training guidance) helps developers avoid constructing code from untrusted input without neutralization, but the effect is a minority one because the clause mandates a general awareness/training practice rather than a specific secure-coding mechanism, and developers remain fallible.
A.8.20's network filtering, segmentation, and disabling of vulnerable protocols can stop remote exploitation of some network-reachable alternate channels, but local, hardware, and application-level alternate channels are outside network security and remain exploitable.
A.8.21's requirements for authentication, authorization and monitoring of network services would block exploitation of CWE-420 instances where the alternate channel is itself a network service interface (e.g., the socket/TCP/FTP/named-pipe examples in the CWE), but the clause does not specifically mandate equivalent protection across channels and does not reach non-network alternate channels such as the IBUS/DBUS or shadow-register examples, leaving a nameable remainder.
Network segregation can block alternate channels that traverse a different network domain (e.g., a management interface on a separate network path), but the weakness is fundamentally about the application's failure to apply consistent protection across all channels — mirror registers, named pipes, same-domain APIs, and hardware buses are unaffected by network-domain boundaries, so only a minority of instances are blocked.
A.8.28's threat modelling and attack surface analysis practices (planning item g, pre-operational item a) are designed to identify all access paths to an asset and would catch some unprotected alternate channels, but the control mandates a fallible human practice rather than a mechanism, so only a minority of instances are prevented.