The LiteLLM Supply Chain Attack Exposes a Structural Problem for Digital Agencies
On March 24, 2026, two malicious versions of the Python package LiteLLM were published on PyPI. Versions 1.82.7 and 1.82.8 were available for approximately three hours before being quarantined. For a digital agency deploying AI agents for its clients, this incident goes far beyond a security news item. It exposes a structural problem that most technical teams refuse to confront: the dependency chain of AI pipelines has become a major attack vector, and almost nobody is prepared.
LiteLLM, for those unfamiliar, is a unified gateway to over 100 language model providers. OpenAI, Anthropic, Azure, Bedrock, Vertex AI: everything flows through LiteLLM via an OpenAI-compatible interface. The project, which came through Y Combinator (batch W23), accumulates 3.4 million daily downloads on PyPI. When you compromise LiteLLM, you do not steal a single password. You potentially recover all the API keys for every LLM provider across an entire organization in a single operation.

At Bridgers, we see this incident as a textbook case that deserves thorough analysis, not only from a technical standpoint, but from the DevOps and governance angle that every serious agency must master.
Anatomy of a Cascade Attack: From Trivy to PyPI
What makes this attack remarkable from a DevOps perspective is the sophistication of the compromise chain. The attackers did not target LiteLLM's source code directly. They first compromised Trivy, a widely used open-source security scanner in CI/CD pipelines. By exploiting an unpinned Trivy GitHub Action in LiteLLM's pipeline, they exfiltrated the PYPI_PUBLISH token, which allowed them to publish directly to PyPI without going through official build workflows.
This is the nightmare scenario for any DevOps lead: the tool that is supposed to protect your pipeline becomes the attack vector. And this is exactly the type of risk that most conventional security audits do not cover. When you audit your application code, nobody checks whether your GitHub Actions are pinned to a specific SHA rather than a mutable tag.
Researchers at Trend Micro identified this campaign as part of a broader effort led by a group called TeamPCP. This is therefore not an isolated incident. It is a reproducible attack pattern that systematically targets high-adoption open-source projects in the AI ecosystem.
The .pth File: Why This Technique Should Alarm Every DevOps Team
Version 1.82.7 contained a classic payload in a Python file of the proxy server, which only activated upon importing the proxy module. Version 1.82.8 crossed a far more concerning threshold by introducing a litellm_init.pth file in the site-packages directory.
.pth files are an obscure Python mechanism. Processed by the site module at interpreter startup, any line beginning with import is executed automatically. In practice, the malicious code triggered every time Python launched, whether you imported LiteLLM or not. Opening a Jupyter notebook, running pip, starting a language server in your IDE: anything was enough.
For an agency managing multiple client environments, the implications are considerable. A developer who installs an update on their local machine potentially compromises their entire workstation. And if that workstation has access to staging or production environments for several clients via SSH, kubectl, or cloud profiles, the impact multiplies exponentially.
The malware did not stop at stealing environment variables. It scanned SSH keys, AWS/GCP/Azure credentials, Kubernetes tokens, and database passwords. Data was encrypted with AES/RSA and exfiltrated to models.litellm.cloud and checkmarx.zone, domains registered by the attackers. A Python backdoor named sysmon was installed for persistence via systemd.
Ironically, a bug in the attacker's code accelerated detection. The .pth mechanism created a recursive loop: every Python process launched by the malware triggered the .pth again, which spawned another process, and so on. This fork-bomb-like loop saturated RAM on affected machines, making the problem immediately visible.
Vector | Impact | Who Is Affected |
|---|---|---|
Environment variables | Theft of all LLM API keys | Any pip install of LiteLLM 1.82.7/8 |
.pth files | Execution at Python startup | Every Python process on the machine |
Kubernetes tokens | Lateral movement in cluster | Production Kubernetes environments |
SSH keys | Remote server access | Developer workstations with infra access |
systemd persistence | Permanent backdoor | Affected Linux servers |
What This Reveals About AI Pipelines in Agency Settings
At Bridgers, we work daily with architectures that integrate LLM gateways like LiteLLM, agent orchestrators, and complex processing chains. This incident highlights three structural problems we observe in most agency AI projects.
The first problem is credential concentration. An LLM proxy centralizes API keys from multiple providers by nature. It is a single point of failure for credentials. Most teams store these keys in environment variables without automatic rotation, without an external vault, without segmentation. A proxy compromise exposes everything.
The second problem is the absence of dependency integrity verification. How many Dockerfiles in agency settings contain pip install litellm without pinning the version or verifying the hash? How many CI/CD pipelines use GitHub Actions referenced by mutable tags rather than SHAs? Convenience has systematically taken precedence over security in the Python/AI ecosystem.
The third problem is the lack of isolation between client projects. In an agency, the same developer often works on multiple projects. A single compromised workstation can expose environments for all clients simultaneously if access is not strictly segmented.
Protection Strategy for Agencies: Beyond Incident Response
Immediate verification remains necessary for anyone who used LiteLLM during the exposure window. Run pip show litellm to check the version. Search for the litellm_init.pth file with find / -name "litellm_init.pth" 2>/dev/null. Examine connections to models.litellm.cloud and checkmarx.zone in your network logs. Check for a sysmon process in ~/.config/ and suspicious systemd user services.
But the real question for an agency is how to avoid being in this situation in the future. And the answer requires deep practice changes, not just a post-incident scan.
The first measure is strict dependency pinning with hash verification. Every package installed in a Dockerfile or requirements.txt should be pinned to a specific version with its SHA256 hash. This practice prevents the installation of a modified package even if the version number is identical.
The second measure is centralizing secrets in an external vault. HashiCorp Vault, AWS Secrets Manager, GCP Secret Manager, or Azure Key Vault: API keys should never reside in static environment variables. A vault enables automatic rotation, access auditing, and instant revocation.
The third measure is pinning GitHub Actions by SHA. Replacing uses: aquasecurity/trivy-action@main with uses: aquasecurity/trivy-action@abc123def456 is the only way to guarantee that the code executing in your CI/CD pipeline is the code you validated.
The fourth measure is isolating environments per client. Each client project should have its own set of credentials, its own cloud accounts, and its own network access. A compromise on one project must not cascade to others.
The Official Docker Image Was Unaffected: An Important Nuance
A point often misunderstood in analyses of this incident: the official LiteLLM Proxy Docker image was not affected. This image pins its dependencies and does not install via pip from PyPI at build time. Installations from GitHub source code are also unaffected.
This distinction is fundamental for agencies recommending architectures to their clients. Advocating the use of official containers rather than direct pip installations in custom images is no longer merely a best practice. It has become a security requirement.
The Real Problem: Implicit Trust in the Open-Source AI Ecosystem
At its core, the LiteLLM incident raises a question that the AI industry prefers to ignore. The pace of innovation in the AI agent ecosystem rests on implicit trust in thousands of open-source packages maintained by small teams. When a package reaches 3.4 million daily downloads, it becomes a prime target for attackers, but its security infrastructure does not scale proportionally.
For digital agencies building AI solutions for their clients, this means that software supply chain security must become a core competency, not a topic delegated to the infrastructure team. Every new AI package added to a project increases the attack surface. Every automatic update is a potential vector. And the question is no longer whether another attack of this type will occur, but when.
The LiteLLM incident is not an accident. It is the logical consequence of an ecosystem that has prioritized adoption speed over supply chain robustness. Agencies that invest in their DevSecOps practices before the next incident will be those that can guarantee to their clients that the promise of AI does not become an existential risk.
The broader lesson is architectural. Every component in an AI pipeline that touches credentials is a potential target. LLM gateways, orchestrators, monitoring tools, embedding services: each represents a node where a supply chain compromise can cascade to every connected system. Agencies that map these dependency graphs for their client projects and implement defense in depth at every layer will be the ones still standing when the next package is compromised. Because it will happen again, and it will target a different link in the chain.
Got a project in mind?
SEO, prospecting, B2B data, AI agents, websites or design: 30 minutes to talk it through.
A 30-minute call with the team. Final price set together.



