LiteLLM Release Pipeline Compromised to Distribute Info-Stealer Malware via PyPI and Docker
A major security incident has hit the open-source artificial intelligence ecosystem after attackers successfully compromised the release pipeline of LiteLLM, a widely utilized Python SDK and AI gateway. Threat actors managed to publish malicious versions of the project’s PyPI package and Docker images, embedding a stealthy payload designed to harvest sensitive credentials, security secrets, and environment variables from unsuspecting developer and enterprise environments.
The software supply-chain attack specifically affected all PyPI wheels, which are standard .whl installation packages, for LiteLLM version 1.107.0. The compromised builds impacted a broad range of operating systems, including Windows, Linux, and macOS environments. LiteLLM serves as a critical open-source infrastructure tool that enables applications to seamlessly access artificial intelligence models from various third-party providers through a unified, common application programming interface.
Given its utility, the project commands massive popularity within the global software development community. It boasts approximately 61,800 GitHub stars and commands roughly 92 million monthly downloads on the Python Package Index (PyPI). Furthermore, the framework is heavily relied upon by high-profile enterprise companies and technology giants, including NVIDIA, Netflix, AT&T, and Okta, making it a high-value target for sophisticated supply-chain adversaries.
According to project maintainers, the release pipeline security was breached on October 21. Following the unauthorized access, a threat actor pushed the malicious version 1.107.0 directly to the official Docker registry and PyPI repositories. In an official post-mortem analysis published by the project, maintainers confirmed that the version contained compiled malware engineered to steal confidential system credentials and load remote-code execution tools onto host machines. However, the project noted that customers running private enterprise deployments were fortunately not impacted by the compromised public releases.
Multiple application security firms detected the malicious activity within an astonishingly brief window of just six minutes after the rogue LiteLLM version was published, quickly moving to analyze the embedded payload. Threat intelligence researchers discovered that the attacker cleverly avoided modifying any of the core LiteLLM application source code. Instead, the adversary restricted their modifications strictly to the installation package configuration, strategically placing three malicious files into the environment’s Python library directory. These files included cook.pth, cook.py, and sitecustomize.py.
Security analysts from Socket explained the mechanics of the intrusion, noting that during normal system startup routines, Python processes executable .pth lines and subsequently attempts to import sitecustomize modules. Complementing these findings, researchers at Endor Labs highlighted that this sophisticated execution vector ensured the malicious payloads were automatically triggered before any legitimate application code could run, every single time Python was launched within the affected environment. Merely running standard Python interpreter sessions or invoking the pip package manager to investigate an affected installation was enough to inadvertently trigger the malware.

The malware was specifically programmed to scan for and exfiltrate a wide array of sensitive data points stored within the development or production environment. Once harvested, the confidential information underwent a rigorous encryption process utilizing an AES-256-CBC symmetric key. This key was subsequently encrypted using an RSA-4096 public key to ensure secure, covert transmission, and the bundled data was ultimately uploaded to an external endpoint located at litellm[.]dev/healthcheck.
As part of its persistent operational capabilities, one of the malicious files, specifically sitecustomize.py, was designed to launch a detached loader component. This loader routinely checked a GitHub-hosted pointer once every hour, subsequently downloading additional Python code from an external remote server for direct execution on the host machine, thereby maintaining long-term unauthorized access.
Although the malicious packages have since been promptly removed from the public repositories, potentially impacted users are urged to immediately halt all affected deployments. Security experts advise that administrators must inspect their environments thoroughly without launching the underlying Python interpreter, which could inadvertently trigger the lingering malware payload.
Infected systems should be completely isolated from corporate networks and rebuilt entirely from clean, verified backups, while all exposed credentials, API keys, and environment secrets must be rotated immediately. Experts emphasize that simply removing the LiteLLM package directory from the system is insufficient, as it may leave critical startup files or an active loader behind in the environment libraries.
Currently, the project and security researchers recommend downgrading or reverting to LiteLLM version 1.106.2, which stands as the latest verified clean release published prior to the security breach.
This latest incident marks yet another supply-chain challenge for the project. Previously, LiteLLM suffered a notable security breach in March, when the threat group known as TeamPCP published malicious versions of the package on PyPI. That earlier intrusion followed a compromise of Aqua Security’s Trivy vulnerability scanner, a security tool utilized directly within LiteLLM’s continuous integration and continuous deployment (CI/CD) pipeline.
