LiteLLM RCE flaw exploited in the wild (CVE-2026-40217)
At a glance
| Severity | CRITICAL |
|---|---|
| CVSS | CVE-2026-40217: 8.8 |
| EPSS (30-day exploit probability) | CVE-2026-40217: 17.0% |
| In CISA KEV (exploited) | Yes, due 2026-12-02 |
| Vendor | BerriAI |
| CVE IDs | CVE-2026-40217 |
Primary-source details
- CVE-2026-40217: CVSS 8.8 (High), per NVD; a fixed version has not been published; added to the CISA KEV catalog on 2026-11-18, remediation due 2026-12-02; vendor advisory (listed by NVD).
CISA has added a LiteLLM remote code execution flaw, CVE-2026-40217, to its Known Exploited Vulnerabilities catalog, which confirms active exploitation of this LiteLLM vulnerability. According to the CISA KEV entry, added on 2026-11-18, federal agencies must act by 2026-12-02. The flaw carries a CVSS score of 8.8 (High).
What happened
CISA lists the issue as “BerriAI LiteLLM Unprotected Alternate Channel Vulnerability”. The NVD record says LiteLLM through 2026-04-08 lets remote attackers run arbitrary code through bytecode rewriting at the /guardrails/test_custom_code URI.
In practice, an endpoint meant for testing custom guardrail code can be abused to execute attacker-controlled code on the server that runs the LiteLLM proxy. CISA has not said who is exploiting it or how widely.
Am I affected? LiteLLM versions
The NVD record lists the following as affected:
- litellm litellm, all versions up to and including 2026-04-08
A fixed version has not been published in the records we have for this CVE. The NVD entry also points to a research advisory from X41 D-Sec and to Red Hat errata, but those references do not state a fixed LiteLLM release. Check your own deployment against the X41 D-Sec advisory and the vendor’s release notes.
Technical details
- CVSS 3.1: 8.8 High, vector AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. That means network reachable, low complexity, low privileges required, no user interaction, and high impact on confidentiality, integrity and availability.
- Weaknesses: CWE-420 (unprotected alternate channel) and CWE-94 (code injection).
- EPSS: 0.1702, about 17%, per FIRST EPSS. EPSS is a probability estimate of exploitation, and this one is already confirmed by the KEV listing.
- KEV: added 2026-11-18, due 2026-12-02. Known ransomware campaign use is listed as Unknown.
The sources differ on one point. CISA describes remote attackers, while the CVSS vector requires low privileges (PR:L). Whether an attacker needs a valid account or API key has not been published, so treat any reachable LiteLLM instance as exposed until you confirm otherwise.
Why this matters
Analysis, not new facts. LiteLLM typically sits between applications and AI model providers, so a proxy host often holds provider API keys, virtual keys and routing configuration. Code execution on that host could expose those secrets and give an attacker a foothold in the network segment that talks to your model providers.
Because the flaw is in CISA KEV, prioritise it above ordinary high-severity findings. Internet-facing instances deserve action within hours, not the full two-week window. CISA’s required action also refers to “Forensics Triage Requirements”, which suggests checking for compromise as well as mitigating.
What to do: how to fix CVE-2026-40217
- Inventory every LiteLLM deployment, including containers, developer test instances and internal gateways, and note the version in use.
- Restrict network access to the proxy now. Block or restrict the
/guardrails/test_custom_codepath at a reverse proxy or WAF if the feature is not needed, and keep the admin and management surface off the public internet. - Follow vendor instructions and the CISA required action: apply the vendor’s mitigations, follow BOD 26-04 guidance for cloud services, or stop using the product if mitigations are unavailable.
- Rotate provider API keys, virtual keys and any secrets stored on or reachable from affected hosts if you find signs of compromise.
- Track the vendor’s channels for a fixed release, because one has not been published in the records reviewed here.
Detection and hunting ideas
No indicators of compromise have been published. These ideas follow from the facts above:
- Search web and proxy logs for any request to
/guardrails/test_custom_code, especially from unexpected IP addresses or without a known user. - Look for new child processes spawned by the LiteLLM service, such as shells or download tools, and for outbound connections from the host that are not to your model providers.
- Review recent changes to guardrail configuration and unexpected use of provider keys, such as spikes in model API spend.
Treat a log hit as a possible compromise: isolate the host, preserve logs and follow your incident response process.
Related coverage
Sources
- CISA Known Exploited Vulnerabilities entry for CVE-2026-40217
- NVD record for CVE-2026-40217
- X41 D-Sec advisory on LiteLLM
- FIRST EPSS
