CVE-2026-40217: LiteLLM through 2026-04-08 allows remote attackers to execute arbitrary code via bytecode rewriting at the /gu
CVE-2026-40217 is a high-severity flaw (CVSS 8.8) affecting litellm. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
LiteLLM through 2026-04-08 allows remote attackers to execute arbitrary code via bytecode rewriting at the /guardrails/test_custom_code URI.
Why this priority
- High severity
- EPSS top 3%: very likely to be exploited
- Public exploit reference
A fixed release or distro patch exists.
Last updated 2026-10-26 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Exact fixes by distribution
Public exploits and detection
Public code exists for this CVE. Treat unpatched systems as at risk, and only run PoCs in a lab.
- GitHub PoC: learner202649/CVE-2026-40217-PoC (0 stars)
- Write-up: www.x41-dsec.de/lab/advisories/x41-2026-001-litellm/
- Nuclei scan template: LiteLLM < 1.25.0 - Remote Code Execution
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2026-40217?
litellm: upgrade to newer than 2026-04-08. Exact commands for each OS are on this page.
Is CVE-2026-40217 being exploited?
CVE-2026-40217 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2026-40217 affect?
CVE-2026-40217 affects litellm. Severity is high (CVSS 8.8). LiteLLM through 2026-04-08 allows remote attackers to execute arbitrary code via bytecode rewriting at the /guardrails/test_custom_code URI.
How urgent is CVE-2026-40217?
Priority 60/100. High severity; EPSS top 3%: very likely to be exploited; Public exploit reference
Related CVEs
- CVE-2026-42208 CRITICAL 9.8 EXPLOITED UPGRADE BerriAI LiteLLM SQL Injection Vulnerability
- CVE-2026-42271 HIGH 8.8 EXPLOITED UPGRADE UPGRADE BerriAI LiteLLM Command Injection Vulnerability
- CVE-2026-42203 HIGH 8.8 UPGRADE LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format
- CVE-2026-49468 CRITICAL 9.8 UPGRADE LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format
- CVE-2026-12773 HIGH 7.3 UPGRADE A weakness has been identified in BerriAI litellm up to 1.59.8