What is CVE-2026-40217?
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.
CISA added this issue to its exploited-vulnerability catalog on 2026-11-18. This is the catalog date, not this article’s publication date.
Sources: CISA Known Exploited Vulnerabilities catalog, CVE-2026-40217 — NVD, CVE-2026-40217 — CVE Program record
First, confirm where the vulnerable product is running
LiteLLM through 2026-04-08 contains an unprotected alternate channel vulnerability (CVE-2026-40217) allowing remote code execution via bytecode rewriting at /guardrails/test_custom_code. The MITRE record notes no fixed versions are established in the catalog; verify in the linked X41 D-Sec advisory. BerriAI has not published a version-bump or patch package through the structured catalog. Stakeholders must evaluate internet exposure and apply mitigations per CISA BOD 26-04 and Forensics Triage Requirements.
The named vulnerable product is BerriAI LiteLLM. Deployment on a cloud platform does not by itself establish that a managed AWS, Azure or GCP service is vulnerable. Confirm the product, version, vendor-supported deployment and remediation owner.
Vendor remediation comes first
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.
Use the current vendor advisory for affected versions and fixed builds. This catalog entry does not establish a universal fixed version or a cloud-specific hotfix.
Sources: CISA Known Exploited Vulnerabilities catalog, CVE-2026-40217 — NVD
AWS: remediation and deployment checks
Use these checks only if your inventory confirms an affected, vendor-supported deployment in this environment.
- Check if any AWS-hosted EC2 instances are running a customer-managed LiteLLM deployment. If so, verify whether a BerriAI-supported fix exists and apply it per the vendor advisory; do not assume Patch Manager coverage for this third-party application.
- If LiteLLM runs as a container on AWS Fargate or ECS, confirm the container image source and version; cross-reference the X41 advisory for any available patched artifact or tag.
- Review AWS Systems Manager Patch Manager compatibility: it supports OS-level package updates on managed nodes but does not cover arbitrary vendor appliances or third-party Python applications without a vendor-supported update.
- Document internet-facing status of each instance; if exposure cannot be mitigated, consider discontinuation per CISA BOD 26-04.
Sources: AWS Systems Manager Patch Manager
Azure: remediation and deployment checks
Use these checks only if your inventory confirms an affected, vendor-supported deployment in this environment.
- Confirm whether Azure VMs or Azure Arc-connected machines are running a customer-managed LiteLLM deployment. Azure Update Manager handles OS and supported application patches; it does not patch third-party Python frameworks without a vendor-released fix.
- Check Azure App Service or AKS clusters hosting LiteLLM: verify the container image version and examine the X41 D-Sec advisory for any vendor-provided patched release.
- Validate that any observed update does not conflate OS patches with application-level fixes; Azure Update Manager reports OS updates separately from application updates.
- If no vendor-supported patch is available and the service is internet-facing, evaluate discontinuation per CISA BOD 26-04 guidance.
Sources: Azure Update Manager overview
GCP: remediation and deployment checks
Use these checks only if your inventory confirms an affected, vendor-supported deployment in this environment.
- Inspect Google Compute Engine VMs running a customer-managed LiteLLM deployment via VM Manager Patch. This tool operates through OS Config and supported OS update mechanisms; it does not update arbitrary vendor Python applications.
- For containerized LiteLLM on GKE or Cloud Run, examine the container image tag and version. Cross-reference the X41 D-Sec advisory for any vendor-issued patched artifact; do not assume GCP-managed services are affected without evidence.
- Verify that any applied updates are OS-level and do not substitute for an application-level fix from BerriAI.
- If the affected software is internet-exposed and no vendor patch exists, consider discontinuation per CISA BOD 26-04.
How to verify the fix
- Run the vendor's recommended test case (if documented in the X41 advisory) against a staging deployment to confirm the bytecode rewriting vector no longer executes at /guardrails/test_custom_code.
- Check the LiteLLM process logs for any unexpected code execution attempts at the /guardrails/test_custom_code endpoint after applying the vendor's mitigation steps.
- Confirm the installed LiteLLM version or container tag against the vendor advisory; if no fixed version is listed, document that version data is unavailable and the mitigation status is unconfirmed.
- Perform a network reachability test: attempt to hit /guardrails/test_custom_code from an external source and verify the request is blocked or returns an error, consistent with the vendor's guidance.
Questions teams ask
Does CISA KEV track remediation status for individual LiteLLM assets?
No. CISA KEV catalogs known exploited vulnerabilities but does not track per-asset patching status or confirm remediation. Stakeholders must evaluate exposure and apply vendor mitigations independently.
If I apply an OS patch, does that fix CVE-2026-40217?
No. The vulnerability is in the LiteLLM application, not the underlying operating system. OS patches from AWS Patch Manager, Azure Update Manager, or GCP VM Manager do not address the bytecode rewriting flaw. A vendor-supported LiteLLM fix is required.
Is LiteLLM on a managed cloud service (e.g., AWS Marketplace) affected?
Applicability is not established by the supplied sources. Managed services may apply their own platform-level updates; consult the marketplace provider or BerriAI for confirmation.
Sources & further reading
- CISA Known Exploited Vulnerabilities catalog
- Source catalog snapshot
- CVE-2026-40217 — NVD
- CVE-2026-40217 — CVE Program record
- Referenced advisory — github.com
- Referenced advisory — www.cisa.gov
- Referenced advisory — www.cisa.gov
- CVE record reference — www.x41-dsec.de
- AWS Systems Manager Patch Manager
- Azure Update Manager overview
- Google Cloud VM Manager — About Patch
This brief summarizes public source material. Confirm affected versions and the current vendor instructions before changing production. No original exploit validation is claimed.