Supply‑Chain Attack Compromises LiteLLM PyPI Package, Distributes Credential‑Stealing Malware
What Happened – On 21 October 2026 threat actors breached the release pipeline of the open‑source LiteLLM project, a widely‑used Python SDK and AI gateway. They uploaded a malicious version 1.107.0 to both the PyPI package index and several Docker registries. All seven wheel files for LiteLLM 1.107.0 were replaced with binaries that drop three payload files (cook.pth, cook.py, sitecustomize.py) into the Python library directory. When the interpreter starts, the .pth file is executed and sitecustomize.py launches a loader that periodically fetches additional code from a GitHub‑hosted pointer, enabling remote‑code execution.
The payload harvests a broad set of secrets: cloud provider keys (AWS, Azure, GCP), Kubernetes and Docker credentials, AI model provider tokens, developer secrets (Git, GitHub, npm, PyPI, CI/CD tokens), private SSH/GPG/TLS keys, browser cookies and autofill data, as well as environment variables and system information. Stolen data is encrypted with AES‑256‑CBC, the key itself wrapped by RSA‑4096, and exfiltrated to litellm.dev/healthcheck.
Multiple application‑security firms detected the malicious release within six minutes of publication. Analysis confirmed that the core LiteLLM source code was untouched; only the distribution artifacts were altered. The compromised Docker images were available from 11:46 UTC to 14:20 UTC before being removed.
The incident impacts any system that installed LiteLLM 1.107.0 via pip install litellm==1.107.0 or pulled the associated Docker images. Running Python or pip on an infected environment triggers the malware, even if the user only attempts to inspect the package. The maintainer advises immediate removal of the affected version, isolation of infected hosts, full rebuild from clean backups, and rotation of all exposed secrets. The clean fallback release is LiteLLM 1.106.2.
LiteLLM’s popularity magnifies the risk: the project has over 61 k GitHub stars, 92 million monthly PyPI downloads, and is integrated into products at NVIDIA, Netflix, AT&T, and Okta. A prior supply‑chain breach in March 2026, linked to Aqua Security’s Trivy scanner, underscores the recurring vulnerability of its CI/CD pipeline.
Why It Matters for Trust & Control Assurance – The breach demonstrates the critical need for continuous third‑party risk monitoring and immutable build pipelines to satisfy supply‑chain integrity controls.
Who Is Affected – Software developers, AI/ML platform providers, cloud‑native enterprises, and any organization that integrates open‑source AI SDKs into production workloads.
Recommended Actions –
- Stop all deployments using LiteLLM 1.107.0 and remove the package directory from hosts.
- Isolate potentially infected systems, rebuild from verified clean images, and rotate every credential that may have been stored or used by the compromised version.
- Implement signed package verification (e.g., PEP 458/PEP 480) and enforce reproducible builds for all third‑party dependencies.
- Deploy continuous monitoring of upstream repositories and registries for unexpected changes.
- Document the incident in your supply‑chain risk register and map the findings to the “Software supply‑chain integrity” control objective.
Technical Notes –
- Attack vector: compromised CI/CD release pipeline → malicious PyPI wheels and Docker images.
- Payload files:
cook.pth,cook.py,sitecustomize.py. - Execution trigger: Python’s automatic import of
.pthandsitecustomizeon interpreter start. - Exfiltration endpoint:
https://litellm.dev/healthcheck. - No CVE assigned; the vulnerability lies in the project’s release‑process controls rather than a software flaw.
- Detection: security firms’ telemetry flagged the anomalous package within six minutes.
Source: BleepingComputer