CVE-2026-40217 — BerriAI LiteLLM Unprotected Alternate Channel Vulnerability
Description
BerriAI LiteLLM contains an unprotected alternate channel vulnerability that could allow remote attackers to execute arbitrary code via bytecode rewriting at the /guardrails/test_custom_code URI.
Required action
Apply mitigations in accordance with vendor instructions, ensuring compliance with CISA’s BOD 26-04 Prioritizing Security Updates Based on Risk (see URL in Notes) guidance and CISA’s “Forensics Triage Requirements” (see URL in Notes). Follow applicable BOD 26-04 guidance for cloud services or discontinue use of the product if mitigations are unavailable. Stakeholders are responsible for evaluating each asset's internet exposure and ensuring adherence to BOD 26-04 patching guidelines.
Notes
https://github.com/BerriAI/litellm/security/advisories/GHSA-wxxx-gvqv-xp7p ; BOD 26-04: https://www.cisa.gov/news-events/directives/bod-26-04-prioritizing-security-updates-based-risk ; Forensics Triage Requirements: https://www.cisa.gov/news-events/directives/bod-26-04-implementation-guidance-prioritizing-security-updates-based-risk ; https://nvd.nist.gov/vuln/detail/CVE-2026-40217
Executive AI analysis
Plain-English summary
A critical vulnerability in BerriAI LiteLLM allows remote attackers to run unauthorized code on target systems. By abusing an exposed endpoint at /guardrails/test_custom_code through bytecode manipulation, attackers can bypass security controls and achieve remote code execution without proper authorization.
Business impact
Successful exploitation compromises the entire host running LiteLLM. Attackers could steal sensitive API keys, intercept proprietary prompts and enterprise AI data, pivot deeper into internal network environments, or use instances as launchpads for lateral movement and extortion.
Cloud / AWS relevance
LiteLLM is frequently deployed on AWS services such as ECS, EKS, or EC2 as an AI proxy gateway. Compromising this service could allow attackers to access linked AWS IAM roles, exfiltrate sensitive secrets stored in AWS Secrets Manager or Parameter Store, and access underlying cloud resources.
Recommended action
Immediately apply vendor security updates from BerriAI. Restrict or block public access to the /guardrails/test_custom_code endpoint, enforce strict network controls and WAF rules, conduct forensic checks on exposed instances, and adhere to CISA BOD 26-04 requirements.
Need help remediating this vulnerability?
Our team helps organizations patch, mitigate, and respond to CISA KEV advisories fast.