---
title: LiteLLM custom-code guardrail sandbox escape (CVE-2026-40217)
description: >-
  The LiteLLM proxy's custom-code guardrail test endpoint (/guardrails/test_custom_code) ran user
  code in a sandbox that could be escaped, giving code execution...
url: https://expiredqueues.com/security-advisories/litellm-cve-2026-40217/
markdown: https://expiredqueues.com/security-advisories/litellm-cve-2026-40217/index.md
image: https://expiredqueues.com/images/og/security-advisories-litellm-cve-2026-40217-4fec3246.jpg
---

[Security advisories](https://expiredqueues.com/security-advisories/index.md)

# LiteLLM custom-code guardrail sandbox escape (CVE-2026-40217)

First listed 20 November 2026 Updated 20 November 2026

Exploited Fix available

The LiteLLM proxy's custom-code guardrail test endpoint (/guardrails/test\_custom\_code) ran user code in a sandbox that could be escaped, giving code execution in the proxy process, which runs as root in the default Docker image. It affects 1.81.8 up to before 1.83.10. The advisory says reaching the endpoint needs a proxy-admin credential in default configurations. LiteLLM fixed it in May 2026, and CISA added it to its Known Exploited Vulnerabilities list on 18 Nov 2026.

- Vendor

  BerriAI

- Type

  Exploited

- Status

  Fix available. Listed in the CISA Known Exploited Vulnerabilities catalog.

- CVE

  [CVE-2026-40217](https://www.cve.org/CVERecord?id=CVE-2026-40217)

- Tags

  litellm, Python, pypi

- History

  - 20 November 2026 First listed. In CISA KEV since 18 Nov 2026. Fixed upstream in May 2026; the advisory's version field says 1.83.10 and its text says 1.83.11.

[Read the source](https://github.com/BerriAI/litellm/security/advisories/GHSA-wxxx-gvqv-xp7p)

## More sources

- [nvd.nist.gov/vuln/detail/CVE-2026-40217](https://nvd.nist.gov/vuln/detail/CVE-2026-40217)

This is one entry in a list I pick by hand. It tells you whether a fix exists. For how to apply it, follow the source. [See all advisories](https://expiredqueues.com/security-advisories/index.md).

**Follow Expired Queues.** We are on X and Instagram.

[](https://x.com/expiredqueues "Expired Queues on X (@expiredqueues)")[](https://www.instagram.com/expiredqueues/ "Expired Queues on Instagram (@expiredqueues)")

## Structured data

```json
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "LiteLLM custom-code guardrail sandbox escape (CVE-2026-40217)",
  "description": "The LiteLLM proxy's custom-code guardrail test endpoint (/guardrails/test_custom_code) ran user code in a sandbox that could be escaped, giving code execution in the proxy process, which runs as root in the default Docker image. It affects 1.81.8 up to before 1.83.10. The advisory says reaching the endpoint needs a proxy-admin credential in default configurations. LiteLLM fixed it in May 2026, and CISA added it to its Known Exploited Vulnerabilities list on 18 Nov 2026.",
  "datePublished": "2026-11-20",
  "dateModified": "2026-11-20",
  "author": {
    "@type": "Person",
    "name": "Adrian Noel",
    "url": "https://expiredqueues.com/about/"
  },
  "publisher": {
    "@type": "Person",
    "name": "Adrian Noel"
  },
  "mainEntityOfPage": "https://expiredqueues.com/security-advisories/litellm-cve-2026-40217/",
  "isPartOf": {
    "@type": "CollectionPage",
    "@id": "https://expiredqueues.com/security-advisories/"
  },
  "about": "BerriAI",
  "keywords": "CVE-2026-40217",
  "citation": "https://github.com/BerriAI/litellm/security/advisories/GHSA-wxxx-gvqv-xp7p"
}
```
