Patchfirst
CVE-2026-40217 Public exploit High · 8.8 EPSS 15.5%

LiteLLM through 2026-04-08 allows remote attackers to execute arbitrary code via bytecode rewriting at the /guardrails/test_custom_code URI.

BerriAI · LiteLLM

Summary

The flaw is in BerriAI's LiteLLM, in its guardrails handling at the /guardrails/test_custom_code endpoint, which permits code injection through bytecode rewriting. An attacker with remote network access and low-privilege authentication, requiring no user interaction, can execute arbitrary code on the affected system.

Heading is the official description · CVE.org
Breakdown
73.2 / 100
Exploited
Yes, in VulnCheck KEV
Reports
0
Tactics
0/15

Public exploit code (PoC-in-GitHub) appeared 39 days after disclosure. No confirmed exploitation is recorded.

  1. Disclosedday 0
  2. Public exploit codePoC-in-GitHub+39 days

techniques

No techniques linked

No ATT&CK techniques are linked to this CVE yet. MITRE CTID has not mapped it, and no report passage in the corpus ties it to a technique.

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: litellm.

Upgrade to 1.84.0 or later

Fixes this CVE and 5 other known vulnerabilities in this package (CVE-2026-35029, CVE-2026-42208, +3).

pippip install "litellm>=1.84.0"

First fixed in 1.83.10 for CVE-2026-40217.

Affected versions

If you runUpgrade to
1.81.8 up to 1.83.101.84.0first fix for this CVE: 1.83.10

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

Also mentioned in 14 community threat pulses (AlienVault OTX)

Weaker evidence

Pulses are indicator collections that anyone can publish. A mention is not confirmation of exploitation.

References

6 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close