Skip to main content
Mallory
← Back to News
ai-platform-securityinternet-facing-service-vulnerability

LiteLLM Guardrail Sandbox Escape Enables Authenticated Remote Code Execution

Emerging Technology Risk · 3 sources · Updated 16h ago · First seen Nov 19, 2026

LiteLLM Guardrail Sandbox Escape Enables Authenticated Remote Code Execution

A high-severity sandbox escape in BerriAI’s LiteLLM proxy allows authenticated users to execute arbitrary code through the /guardrails/test_custom_code endpoint. X41 D-Sec researcher Markus Vervier found that Python bytecode rewriting can bypass regex-based restrictions on submitted guardrail code, enabling command execution with the LiteLLM process’s privileges—root in the default Docker image. X41 rated the vulnerability CVSS 8.7 and confirmed it in a specific main-latest container image; its April advisory did not identify a patched version. Compromise could expose AI-provider credentials and other secrets accessible to the proxy.

A November 19 Shellcode report identifies the flaw as CVE-2026-40217 and says CISA added it to the Known Exploited Vulnerabilities catalog following active exploitation. The report alleges its use in LLMjacking campaigns involving stolen inference quotas, credential theft, and cryptomining, and names v1.83.14-stable or later as the complete fix. Those exploitation, catalog-listing, and remediation claims are not independently substantiated by the supplied primary advisory or telemetry. Operators should restrict access to the affected endpoint, verify remediation guidance with BerriAI, review endpoint access logs and AI billing for anomalies, and rotate potentially exposed credentials where compromise is suspected.

New surface, new adversariesTrack how attackers are adapting to this technology.
Track this risk
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

5 events
  1. Reported Nov 19, 20261d ago

    CISA reportedly adds CVE-2026-40217 to its KEV catalog

    Shellcode reports that CISA added the LiteLLM vulnerability to its Known Exploited Vulnerabilities catalog following active exploitation. The supplied material does not include the underlying CISA catalog entry or an explicit date for the addition.

    LiteLLM Sandbox Escape Added to CISA KEV | Shellcode
  2. Reported Nov 19, 20261d ago

    Attackers reportedly exploit CVE-2026-40217 in LLMjacking campaigns

    Shellcode reports exploitation of the LiteLLM sandbox escape against financial, retail, and technology organizations across North America, South America, and Asia-Pacific, with objectives including inference-quota theft, credential exfiltration, and cryptominer deployment. The supplied material does not include underlying telemetry independently substantiating these campaign claims.

    LiteLLM Sandbox Escape Added to CISA KEV | Shellcode
  3. Reported Nov 19, 20261d ago

    LiteLLM v1.83.14-stable reportedly consolidates broader exploit-chain fixes

    The Shellcode report identifies LiteLLM v1.83.14-stable as consolidating fixes for a broader privilege-escalation and remote-code-execution chain. The supplied material does not include primary release documentation substantiating this patch-version claim.

    LiteLLM Sandbox Escape Added to CISA KEV | Shellcode
  4. Reported Nov 19, 20261d ago

    LiteLLM v1.83.11 reportedly introduces a RestrictedPython sandbox

    The Shellcode report identifies LiteLLM v1.83.11 as introducing an initial replacement of the vulnerable sandbox with RestrictedPython.

    LiteLLM Sandbox Escape Added to CISA KEV | Shellcode
  5. Reported Apr 8, 20268mo ago

    X41 discloses a LiteLLM guardrail sandbox escape

    X41 D-Sec disclosed that authenticated users could bypass regex-based filtering in LiteLLM’s /guardrails/test_custom_code endpoint through Python bytecode rewriting and execute arbitrary code. The advisory rated the vulnerability high severity and noted that the default Docker image runs the LiteLLM process as root; patched versions were still undetermined.

    Advisory X41-2026-001: Guardrail Sandbox Escape in LiteLLM | X41 D-Sec - Penetration Tests and Source Code Audits
Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.

Open in app →

Affected products

1 linked
Litellm
Do you run this?Follow how adversaries are adapting to this technology, and where it touches your stack today.
Track This Risk
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.