LiteLLM Hit by PyPI Supply-Chain Compromise and Guardrail Sandbox Escape
Supply Chain Risk · 5 sources · Updated 5mo ago · First seen Mar 27, 2026

Datadog Security Labs reported that the TeamPCP supply-chain campaign compromised the legitimate PyPI package LiteLLM, publishing malicious versions 1.82.7 and 1.82.8 that stole credentials, exfiltrated data, established persistence, and in some cases attempted to spread into Kubernetes environments. The campaign also hit Telnyx on PyPI and was linked to earlier compromises involving Trivy, npm packages, Aqua Security repositories, and Checkmarx tooling, with researchers concluding that stolen CI/CD and publishing credentials were reused across ecosystems. Datadog warned that LiteLLM 1.82.8 was especially dangerous because a malicious .pth file triggered payload execution when the Python interpreter started, while the Telnyx package executed code at import time and retrieved a second-stage payload hidden in a WAV file.
Separately, X41 disclosed a high-severity sandbox escape in BerriAI LiteLLM affecting the main-latest Docker image, where authenticated users could reach arbitrary code execution through the /guardrails/test_custom_code API endpoint. The flaw relied on bypassing regex-based restrictions on custom Python guardrail code using string concatenation and CPython bytecode rewriting to recover unrestricted builtins and call __import__, allowing commands to run as the LiteLLM process user, which is root in the default Docker deployment. X41 assigned the issue CWE-94 and a CVSS 4.0 score of 8.7, and Datadog advised organizations that installed the malicious LiteLLM releases to treat affected hosts and CI jobs as full credential-exposure events, rotate secrets, hunt for persistence and outbound traffic, and rebuild critical systems from known-good images rather than relying only on package rollback.


