Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-40217 — litellm

🟠 CVSS 8.0 — High ⚠️ Exploit Public CWE-420 OSV
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

LiteLLM has a sandbox escape in custom-code guardrail

Impact

The POST /guardrails/test_custom_code endpoint runs user-supplied Python inside a hand-rolled sandbox. The sandbox can be escaped using bytecode-level techniques, allowing arbitrary code execution in the proxy process — which runs as root in the default Docker image.

Reaching the endpoint requires a proxy-admin credential in default configurations.

Patches

Fixed in 1.83.11. The hand-rolled sandbox has been replaced with RestrictedPython. Upgrade to 1.83.11 or later.

Workarounds

If upgrading is not immediately possible, block POST /guardrails/test_custom_code at your reverse proxy or API gateway.

References

  • Patched release: [v1.83.10-stable](https://github.com/BerriAI/litellm/releases/tag/v1.83.10-stable)

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is high, an attacker needs administrative privileges on the target. No user interaction is required. Rated impact: confidentiality high, integrity high, availability high.

CVSS metrics in full

The score comes from this vector: CVSS:4.0/AV:N/AC:H/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: High — the attacker first has to win a race, learn a secret or otherwise prepare the target.
  • Attack requirements: None — no deployment-specific condition has to hold.
  • Privileges required: High — administrative rights are needed first.
  • User interaction: None — nobody has to be tricked into anything.
  • Confidentiality impact: High — total loss, or loss the attacker controls.
  • Integrity impact: High — total loss, or loss the attacker controls.
  • Availability impact: High — total loss, or loss the attacker controls.

Weakness class

CVE-2026-40217 is classified as CWE-420: Unprotected Alternate Channel. The product protects a primary channel, but it does not use the same level of protection for an alternate channel.

Affected software

CVE-2026-40217 is recorded against 1 package.

  • litellm (from 1.81.8 up to 1.83.10)

Timeline and source

Published on 13 July 2026 and last revised on 15 July 2026. A public exploit is known to exist, which raises the urgency of patching considerably. Record sourced from OSV.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Package)
github.com (Web)
www.x41-dsec.de (Web)
pypi.org (Package)
github.com (Advisory)

Other advisories for this package

litellm has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-420: Unprotected Alternate Channel) in other software:

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector CVSS:4.0/AV:N/AC:H/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
CWE CWE-420
Public Exploit ⚠️ Yes
Source OSV
Published 2026-07-13
Updated 2026-08-20
Modified 2026-07-15
Fix URL N/A

Affected Packages

Software From version Fixed in
litellm 1.81.8 1.83.10

Similar Threats

Exploit Protection

Are you running litellm?

CVE-2026-40217 carries CVSS 8.0 High rating and a public exploit already exists. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2026-40217 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026