LiteLLM PyPI Release 1.107.0 Compromised with Infostealer and RAT
LiteLLM's latest PyPI release, version 1.107.0, was compromised to distribute malware, including an infostealer and a remote access trojan, affecting developers and AI services.

LiteLLM version 1.107.0, released on the Python Package Index (PyPI) on October 21, 2026, was found to be compromised, distributing malicious code within all seven of its wheel files. This malicious release also extended to Docker images, posing a significant risk to developer systems, build runners, and various AI services. Security researchers at Aikido warned that any user who installed this affected version should assume their credentials have been compromised.
While PyPI has since removed version 1.107.0, the removal does not eliminate the malware already installed on user systems nor does it invalidate any secrets that attackers may have successfully exfiltrated. Socket's security scanners detected the malicious package just seven minutes after its publication, highlighting the critical speed at which automated dependency updates can introduce poisoned releases into development environments before human oversight can intervene.
The attack mechanism employed by the threat actors is particularly insidious, leveraging Python's startup hooks rather than relying on direct imports of the LiteLLM library. According to Wiz's technical analysis, the installation process injects three files—cook.pth, cook.py, and sitecustomize.py—directly into the Python site-packages directory. When a Python interpreter starts, cook.pth triggers the execution of cook.py, which then decodes and initiates the credential theft routine. This means that even unrelated Python commands can activate the malware payload post-installation, irrespective of whether LiteLLM itself is directly invoked.
The credential stealer is designed to harvest a wide array of sensitive information, including system details, browser data, developer secrets, cloud service credentials, and authentication tokens for AI tools. Specifically targeted are SSH private keys, credentials for major cloud providers like AWS, Google Cloud, and Azure, stored browser passwords, and API tokens for services such as Claude and GitHub Copilot. The stolen data is encrypted and transmitted via HTTP POST requests to a domain, www[.]litellm[.]dev/healthcheck, which Wiz identified as attacker-controlled and designed to mimic legitimate LiteLLM infrastructure.
In addition to the credential theft, a separate startup file, sitecustomize.py, provides a mechanism for remote code execution on Linux and macOS systems. This component attempts to retrieve a domain list from a GitHub repository (letters9813/pythonclient-test) and subsequently uses the obtained address to download and execute additional Python scripts from a /codepy endpoint. This capability offers attackers a persistent backdoor to run arbitrary code whenever affected Python environments restart. However, Wiz noted that the domain.txt file was not populated during their analysis, and the repository was later taken down, suggesting this specific remote execution path may not have been fully activated.
Users of containerized environments also face risks, as Wiz identified affected LiteLLM images on the GitHub Container Registry and Docker Hub, including tags like v1.107.0, latest, main-latest, and main-stable. This means that even familiar image tags do not guarantee a clean deployment. Further investigation points to a lookalike repository, Berri-AI/litellm, which differs from the legitimate BerriAI/litellm project by a single hyphen, raising concerns about the validation of release sources and the full intrusion vector.
Organizations that installed LiteLLM version 1.107.0 are strongly advised to isolate affected hosts and build runners, preserve relevant logs for forensic analysis, and treat all accessible secrets as compromised. Investigations should encompass package installation records, container deployments, Python startup file modifications, and outbound network connections to the identified collection endpoint. It is crucial to rotate and revoke compromised cloud keys, SSH keys, browser sessions, repository tokens, and AI service credentials from a secure, clean system. Simply replacing the LiteLLM package is insufficient, as stolen credentials can grant attackers access to other systems and services.
Wiz identified version 1.106.2 as the last known safe version. To mitigate further risks, affected environments should be rebuilt from trusted sources, and container deployments should be pinned to verified image digests rather than relying on mutable tags. Reviewing cloud and source control logs for any anomalous activity post-installation is also recommended. This incident marks LiteLLM's second reported supply chain compromise this year, underscoring the persistent challenges in securing software supply chains and the long-term security implications of even brief package exposures.
The malicious LiteLLM version 1.107.0, distributed via PyPI and Docker registries, contained malware designed to steal cloud and AI credentials and execute arbitrary code. The compromised package, uploaded via a compromised release process, exfiltrates browser credentials, cloud provider keys (AWS, GCP, Azure), and LLM API keys. Indicators of compromise include files like /tmp/.pc_once_* and /tmp/remote_code_loader.lock, with the safe version being v1.106.2.
This new report provides further technical details on the compromise, including the specific malicious wheels affected and the mechanism by which the malware is launched. It highlights that the threat actor used stolen GitHub CLI OAuth tokens to trigger and approve the malicious release, and that the malware employs a "cook.pth" file to automatically execute code upon Python interpreter startup, a technique previously observed in other supply chain attacks.
The malicious version of LiteLLM (v1.107.0) was pushed to Docker Hub and PyPI on October 21, 2026, around 4:00 a.m. PST. Attackers exploited a GitHub token leak to bypass security controls, injecting a credential stealer and a backdoor capable of running arbitrary code. The compromised versions included LiteLLM v1.107.0 on PyPI and v1.107.0, latest, main-latest, and main-stable on Docker and GHCR. The incident occurred after LiteLLM had temporarily expanded release permissions for engineers, which the attacker leveraged using stolen GitHub CLI credentials.
This incident, which occurred on October 21, involved version 1.107.0 of the LiteLLM proxy and saw malicious packages online for approximately three hours, with an estimated 49,000 downloads. The attackers gained access by compromising GitHub CLI OAuth tokens, likely leaked through Claude Code logs, which allowed them to disable branch protections and push a poisoned release from a lookalike repository. The malware functions as an information stealer and a RAT, exfiltrating system information, credentials, and API keys to litellm[.]dev, with observed activity including querying Amazon Bedrock models and hourly checks with a C&C server.
This Microsoft Security Blog post provides a deeper technical dive into the LiteLLM 1.107.0 supply chain compromise, detailing the specific Python startup mechanisms used to execute the malicious payload automatically. It elaborates on the credential collection process, including the targeting of developer tools, cloud environments, and browsers, and explains how attackers leveraged stolen GitHub credentials to push the compromised release. The article also offers detailed guidance for defenders on investigation, detection, and recovery, emphasizing that simply removing the package is insufficient.
This new report details how the exposed LiteLLM master key was not only unrevoked but also enabled the attacker to steal GitHub credentials, including an owner-level authentication token. This allowed the threat actor to bypass LiteLLM's two-person release approval process by acquiring two maintainer tokens, ultimately pushing the malicious version 1.107.0 to PyPI and a compromised container image.
This latest report details how the supply chain attack against LiteLLM began with an exposed master key committed to GitHub in May. The attacker leveraged this leaked key to gain owner-level access to LiteLLM's GitHub repositories, enabling them to inject malicious code and steal further secrets, including API keys and cloud credentials, which were then used to distribute the poisoned PyPI package.