Blog
LiteLLM CVE-2026-40217: critical flaw exploited in the wild
What it is and who is affectedCVE-2026-40217 is a vulnerability in BerriAI LiteLLM, officially named the BerriAI LiteLLM Unprotected Alternate Channel...
What it is and who is affected
CVE-2026-40217 is a vulnerability in BerriAI LiteLLM, officially named the BerriAI LiteLLM Unprotected Alternate Channel Vulnerability. According to the National Vulnerability Database (NVD) of NIST, LiteLLM through 2026-04-08 (inclusive) is affected. The flaw is classified under CWE-420 (unprotected alternate channel) and CWE-94 (improper control of code generation).

In practice, the issue allows remote attackers to execute arbitrary code through bytecode rewriting at the /guardrails/test_custom_code URI. The NVD entry was published on 10 April 2026 and carries a CVSS 3.1 score of 8.8 (HIGH), with the vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. That is a serious rating rather than a critical one, but the impact on confidentiality and integrity is high, and the attack path is network-reachable.
LiteLLM is widely used as a gateway layer in front of large language models, which means it often sits in the middle of internal tooling, prototypes and production applications. Any Spanish SME, online shop or small IT team that has deployed LiteLLM — directly or as part of a broader AI stack — should treat this as a priority item, even if the deployment feels like a side project.
Why it is urgent: already exploited in real attacks
This is not a theoretical risk. CISA added CVE-2026-40217 to its Known Exploited Vulnerabilities (KEV) catalogue on 18 November 2026, confirming that the flaw has been used in real attacks. Once a vulnerability enters KEV, the window between disclosure and opportunistic exploitation has effectively closed.
CISA has set US federal agencies a remediation deadline of 2 December 2026. The required action is to apply mitigations in accordance with the vendor's instructions, in line with BOD 26-04 guidance on prioritising security updates based on risk, and to follow the applicable forensics triage requirements. For cloud services, agencies must follow the same guidance or discontinue use of the product if mitigations are unavailable. CISA also stresses that each organisation is responsible for evaluating the internet exposure of its own assets.
The material does not record known use in ransomware campaigns, so there is no basis to claim otherwise. That said, absence of ransomware attribution is not reassurance: code execution reachable over the network is exactly the kind of foothold that later enables lateral movement and data theft.
What to do today
- Inventory first. Check whether LiteLLM is running anywhere in your estate — including developer laptops, staging environments, internal chatbots and side projects that never went through procurement. Confirm the exact version or build date and compare it against the affected range (through 2026-04-08).
- Apply the vendor's fix or mitigation. Follow the advisory published by the vendor and the mitigation guidance referenced in the x41-dsec advisory. Red Hat has also published errata (RHSA-2026:24866 and RHSA-2026:30056) and a CVE page for organisations running affected packages. Do not guess a fixed version number: apply exactly what the vendor advisory specifies.
- Look for signs of intrusion. Because the flaw allows code execution, review logs for unexpected requests to the /guardrails/test_custom_code endpoint, unusual outbound connections, unexpected processes or files, and any credentials or API keys that may have been exposed. Rotate secrets if you have reasonable doubt.
- Reduce what is exposed to the internet. LiteLLM instances should not be openly reachable unless there is a clear business reason. Put them behind authentication, restrict access by IP or VPN, and apply the principle of least privilege to the accounts that can reach the endpoint.
Under GDPR, an exploited code-execution flaw can become a personal data breach if the instance processed customer data, prompts or identifiers. Document your checks and decisions now, while the timeline is still fresh.
How a cybersecurity team like ALMC's can help
Situations like this one rarely fail because the patch is difficult; they fail because nobody knows the software is running. At ALMC we work with SMEs, online shops and small IT teams across Lleida, Barcelona, Tarragona and Girona on exactly that gap: knowing what is exposed, and closing it before someone else finds it.
That typically means an inventory and security audit of your web and server estate, pentesting where it adds value, hardening of servers and of platforms such as WordPress, PrestaShop and Joomla, and ongoing monitoring with incident response when something does go wrong. When a site has already been compromised, we also handle the cleanup and recovery. In the case of CVE-2026-40217, the practical work is to locate every LiteLLM instance, verify versions against the vendor advisory, apply the recommended mitigation, and review logs for evidence of abuse — then make sure the next advisory does not catch you by surprise.
Related
- Ivanti Connect Secure: CVE-2026-104935 Under Active Attack
- CVE-2026-96951: Windows Shell Command Injection Under Attack
- Click to Chat for WhatsApp: CVE-2026-92097 in WordPress
- Abuse Shield
Is your business exposed to flaws like this?
ALMC checks which versions you are running, applies the patches and hardens your servers and website. Contact our team for a security review.
