LiteLLM
- Type
- Infostealer
- Capabilities
- Credential theftSession hijackingExfiltrationPersistenceDefense evasionReconnaissance
- Platforms
- WindowsLinuxmacOSCloud
LiteLLM is a legitimate Python library and proxy for accessing large language model providers that was trojanized in separate software supply-chain attacks in March and October 2026. The malicious releases primarily functioned as credential stealers targeting developer workstations, CI/CD runners, containers, and AI-service deployments. They should be distinguished from uncompromised versions of the legitimate software.
On March 24, 2026, TeamPCP published malicious versions 1.82.7 and 1.82.8 to PyPI using publishing credentials stolen after compromised Trivy tooling executed in LiteLLM’s CI/CD pipeline. Version 1.82.8 introduced a Python startup hook that could execute the payload whenever the interpreter started, without requiring an application to import LiteLLM. The March payload supported credential theft, encrypted exfiltration, and persistent command polling through a Linux user service.
A separate compromise distributed version 1.107.0 through PyPI, Docker Hub, and GitHub Container Registry on October 21, 2026. Its malicious artifacts covered Windows, Linux, and macOS. Python startup hooks launched an obfuscated collector targeting cloud credentials, AI-provider API keys, developer-tool authentication material, browser credential and cookie databases, private keys, environment variables, shell histories, and host information. It also attempted to retrieve stored upstream-provider credentials from LiteLLM Proxy databases. Collected information was encrypted using AES-256-CBC with an RSA-4096-wrapped key and exfiltrated to attacker-controlled infrastructure impersonating LiteLLM.
The October payload also included a detached remote-code loader for Linux and macOS. It periodically consulted a GitHub-hosted pointer and could download and execute additional Python code, although no operational second-stage payload was observed during analysis. Subsequent attacker activity used harvested AWS credentials for identity checks and model enumeration. Attribution of the October incident to TeamPCP has not been established.
Associated vulnerabilities
1 CVE Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Associated threat actors
1 distinct threat actor Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
“Version 1.82.8 installed a .pth file that could run the payload when Python started, even without importing LiteLLM.” Versions 1.82.7 and 1.82.8 were identified as affected.
Techniques & procedures
39 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
8 techniques
Initial Access
Using these stolen publish tokens, the attackers hit PyPI to push versions 1.82.7 and 1.82.8 of LiteLLM... It authenticated to the GitHub API using the victim’s own stolen PAT
The attackers validated cloud keys taken from the Trivy, LiteLLM, and Checkmarx KICS compromises and used them to access cloud services, enumerate infrastructure, run commands inside containers, and exfiltrate sensitive data.
Following LiteLLM-driven credential theft, attackers reportedly use a compromised Tailscale VPN credential for initial access to Mercor’s infrastructure.
The irony is that Mercor was hacked via a third-party open source tool called LiteLLM.
Earlier this month, Mercor said that it was "one of thousands of companies" affected by the LiteLLM supply-chain attack.
The severity of this dependency was demonstrated in March 2026, when attackers compromised the LiteLLM package through dependency confusion, injecting malicious code directly into the request-handling pipeline of every deployment that pulled the poisoned release.
“That specific attack originated through a sophisticated supply chain compromise involving the LiteLLM library. In March 2026, malicious actors aggressively distributed a thoroughly compromised version of this critical library specifically designed to harvest sensitive credentials.”
By abusing valid credentials and trusted CI/CD workflows, attackers are bypassing traditional security controls, enabling widespread access across build systems, cloud infrastructure, and customer environments.
Execution
6 techniques
Execution
POST /mcp-rest/test/connection и POST /mcp-rest/test/tools/list принимали конфигурацию с полями command, args и env для stdio-транспорта. При подключении LiteLLM выполнял указанную команду.
Version 1.82.8 escalated - it added a litellm_init.pth file to site-packages that executes during every Python interpreter startup, not just when LiteLLM is imported.
We found 474 repositories that run a malicious version of trivy-action.
The LiteLLM payload bypassed standard SAST tools through a technique known as .pth file injection . When a package containing a .pth file is installed in the Python site-packages directory, the interpreter automatically reads it during initialization before the primary script is ever executed or imported.
The malware leveraged a .pth file, which executes automatically during Python interpreter startup. This means the payload runs in most Python processes without needing the package to be explicitly imported...
This means organisations running automated CI/CD pipelines may have unknowingly pulled the malicious code during that brief period.
Persistence
9 techniques
Persistence
Version 1.82.8 escalated - it added a litellm_init.pth file to site-packages that executes during every Python interpreter startup... any Python process on the machine triggered the malware.
Using these stolen publish tokens, the attackers hit PyPI to push versions 1.82.7 and 1.82.8 of LiteLLM... It authenticated to the GitHub API using the victim’s own stolen PAT
The attackers validated cloud keys taken from the Trivy, LiteLLM, and Checkmarx KICS compromises and used them to access cloud services, enumerate infrastructure, run commands inside containers, and exfiltrate sensitive data.
Following LiteLLM-driven credential theft, attackers reportedly use a compromised Tailscale VPN credential for initial access to Mercor’s infrastructure.
These packages contained credential-stealing and backdoor code designed to harvest SSH keys, cloud credentials, Kubernetes secrets, database credentials, environment variables, and other sensitive data, while establishing persistent access to attacker-controlled infrastructure.
Finally, the payload installed a systemd backdoor service that polled attacker-controlled infrastructure for additional binaries.
sysmon.service installed as persistent systemd user service
Finally, the payload installed a systemd backdoor service that polled attacker-controlled infrastructure for additional binaries.
.pth file auto-executes on every Python interpreter startup without user action
Privilege Escalation
8 techniques
Privilege Escalation
Version 1.82.8 escalated - it added a litellm_init.pth file to site-packages that executes during every Python interpreter startup... any Python process on the machine triggered the malware.
Using these stolen publish tokens, the attackers hit PyPI to push versions 1.82.7 and 1.82.8 of LiteLLM... It authenticated to the GitHub API using the victim’s own stolen PAT
The attackers validated cloud keys taken from the Trivy, LiteLLM, and Checkmarx KICS compromises and used them to access cloud services, enumerate infrastructure, run commands inside containers, and exfiltrate sensitive data.
Finally, the payload installed a systemd backdoor service that polled attacker-controlled infrastructure for additional binaries.
sysmon.service installed as persistent systemd user service
Finally, the payload installed a systemd backdoor service that polled attacker-controlled infrastructure for additional binaries.
.pth file auto-executes on every Python interpreter startup without user action
Privileged Kubernetes pod with host filesystem mount created in kube-system
Stealth
5 techniques
Stealth
The TeamPCP payload dropped a heavily obfuscated Base64-encoded execution string into a hidden .pth file ... During the Bitwarden CLI compromise on April 22, the core payload bw1.js was a massive 9.7 MB file processed through obfuscator.io, utilizing a 43,436-entry string lookup table
Using these stolen publish tokens, the attackers hit PyPI to push versions 1.82.7 and 1.82.8 of LiteLLM... It authenticated to the GitHub API using the victim’s own stolen PAT
The attackers validated cloud keys taken from the Trivy, LiteLLM, and Checkmarx KICS compromises and used them to access cloud services, enumerate infrastructure, run commands inside containers, and exfiltrate sensitive data.
The LiteLLM payload bypassed standard SAST tools through a technique known as .pth file injection . When a package containing a .pth file is installed in the Python site-packages directory, the interpreter automatically reads it during initialization before the primary script is ever executed or imported.
The malware leveraged a .pth file, which executes automatically during Python interpreter startup. This means the payload runs in most Python processes without needing the package to be explicitly imported...
Credential Access
6 techniques
Credential Access
When the compromised action ran, it harvested LiteLLM’s PyPI publishing token.
Harvest : SSH keys, cloud credentials, Kubernetes secrets, crypto wallets, Slack/Discord tokens
Especially, it did not collect the CI secrets if those were not explicitly set as environment variables.
Harvest : SSH keys, cloud credentials, Kubernetes secrets, crypto wallets, Slack/Discord tokens - and actively queried AWS APIs using stolen IMDS credentials.
The payload searched for and exfiltrated over 50 categories of secrets... crypto wallet keys... and API credentials...
The common thread among those incidents is that they all revolved around secrets, one way or another. Some used secrets as an initial access vector, and others were focused on collecting secrets from victim environments.
Discovery
2 techniques
Discovery
The attackers validated cloud keys taken from the Trivy, LiteLLM, and Checkmarx KICS compromises and used them to access cloud services, enumerate infrastructure...
In Kubernetes, search for node-setup-* pods in kube-system.
Lateral Movement
1 technique
Lateral Movement
plus Kubernetes lateral movement deploying privileged pods across every node in the cluster.
Collection
3 techniques
Collection
The TeamPCP malware specifically sought out these directories, intercepting proprietary prompts and unencrypted model weights directly from the development lifecycle.
Following LiteLLM-driven credential theft, attackers reportedly use a compromised Tailscale VPN credential for initial access to Mercor’s infrastructure. Lateral movement and data staging begin.
Mercor lost roughly 4 terabytes of data through the LiteLLM open-source AI gateway, exposing training methodologies for OpenAI, Anthropic, and Meta in the process.
Command and Control
3 techniques
Command and Control
Exfiltration domain models.litellm[.]cloud C2 domain checkmarx[.]zone
Déploiement de proxies inverses et de workloads agentiques (framework Manus, Node.js custom, LiteLLM gateways)
the payload installed a systemd backdoor service that polled attacker-controlled infrastructure for additional binaries.
Exfiltration
2 techniques
Exfiltration
Exfiltrate : AES-256 encrypted, sent to models.litellm[.]cloud
execute commands in containers, and exfiltrate sensitive cloud data... Reviewing cloud logs for unexpected Amazon Simple Storage Service access, and Secrets Manager retrievals.
Observables
1 indicator attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
12 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.