LiteLLM PyPI Supply Chain Attack Steals Cloud Credentials
TECH

LiteLLM PyPI Supply Chain Attack Steals Cloud Credentials

41+
Signals

Strategic Overview

  • 01.
    On March 24, 2026, malicious LiteLLM versions 1.82.7 and 1.82.8 were published to PyPI containing a three-stage credential-stealing payload that harvested SSH keys, cloud credentials, Kubernetes configs, crypto wallets, and .env files.
  • 02.
    The attack was part of a broader campaign by TeamPCP/LAPSUS$ that previously compromised Aqua Security's Trivy scanner and Checkmarx's KICS GitHub Action, using stolen CI/CD credentials to chain supply chain attacks across ecosystems.
  • 03.
    LiteLLM receives approximately 97 million downloads per month and is present in 36% of cloud environments, making this one of the highest-impact PyPI supply chain attacks to date.
  • 04.
    The malicious packages were available for approximately 3 hours before PyPI quarantined them, but at least 1,000 SaaS environments were impacted and 10+ major downstream projects including DSPy, MLflow, OpenHands, and CrewAI issued emergency security patches.
  • 05.
    Version 1.82.8 introduced a .pth file (litellm_init.pth) that executes automatically on every Python startup, establishing persistence independent of the LiteLLM package itself. A systemd-based backdoor polled checkmarx.zone every 50 minutes for further instructions.
  • 06.
    Docker image users of LiteLLM were not impacted by this attack. LiteLLM has paused all releases pending a full supply chain security review, with Google Mandiant engaged for forensic analysis.

Why This Matters

The LiteLLM compromise represents a critical inflection point in software supply chain security because it demonstrates how a single compromised credential can cascade across multiple ecosystems in a matter of weeks. The attack chain began with Trivy, moved to Checkmarx, and culminated in LiteLLM—each compromise providing the credentials and access needed for the next. This is not a novel concept, but the speed, scale, and sophistication of TeamPCP's campaign sets a new benchmark for supply chain threat actors.

The incentive structure driving these attacks is clear: AI infrastructure packages like LiteLLM sit at critical chokepoints in modern cloud architectures. With 97 million monthly downloads and presence in 36% of cloud environments, compromising a single package yields access to cloud credentials, API keys, and Kubernetes configurations across thousands of organizations simultaneously. The economics overwhelmingly favor attackers—a few hours of access to a popular package can harvest credentials that would take years to obtain through traditional intrusion methods. The fact that TeamPCP specifically targeted security scanning tools (Trivy, Checkmarx) before moving to AI infrastructure suggests deliberate strategy: neutralize the detection layer before attacking the target.

The broader driver is the AI industry's explosive growth outpacing its security maturity. Organizations are rapidly adopting LLM orchestration tools like LiteLLM without adequately vetting their supply chains, creating a massive attack surface that threat actors are now systematically exploiting.

How It Works

The attack unfolded through a carefully orchestrated chain of CI/CD compromises. TeamPCP first breached Aqua Security's Trivy scanner on February 28, 2026, using an AI-powered attack tool called hackerbot-claw. This gave them access to CI/CD secrets, including credentials that connected Trivy's pipeline to other projects. When the Trivy breach was partially cleaned up but secrets were not fully rotated, TeamPCP leveraged the residual access to compromise Checkmarx's KICS GitHub Action on March 23 and, critically, to obtain LiteLLM's PyPI publishing credentials.

The payload itself was deployed in two iterations. Version 1.82.7 embedded a base64-encoded payload directly in litellm/proxy/proxy_server.py—a file commonly imported by LiteLLM users. Version 1.82.8 escalated the technique by including a .pth file (litellm_init.pth) in the package. Python .pth files are processed automatically by the site module during interpreter startup, meaning the malicious code executes every time Python runs in that environment, regardless of whether LiteLLM is explicitly imported. This persistence mechanism survives even if the malicious LiteLLM package is uninstalled, as long as the .pth file remains in the site-packages directory.

The payload operated in three stages: first, it harvested sensitive files including SSH keys (~/.ssh/), cloud credentials (~/.aws/, ~/.gcp/, ~/.azure/), Kubernetes configs (~/.kube/config), cryptocurrency wallets, and .env files. Second, it encrypted the exfiltrated data using AES-256-CBC with RSA-4096 key wrapping before transmitting it to attacker-controlled infrastructure. Third, it installed a persistent systemd service that polled checkmarx.zone every 50 minutes for additional commands, and in Kubernetes environments, deployed privileged pods to every node for lateral movement across the cluster.

By The Numbers

The scale of potential exposure is staggering. LiteLLM receives 97 million downloads per month (approximately 3.4 million daily), with 480 million total PyPI downloads to date. Wiz Research found the package present in 36% of cloud environments they monitor. While the malicious versions were available for only approximately 3 hours, the daily download rate means tens of thousands of installations could have occurred in that window. At least 1,000 SaaS environments were confirmed impacted.

The broader TeamPCP campaign compromised 76 of 77 Trivy version tags on GitHub, 35 Checkmarx KICS Action tags, and 66+ npm packages across 5 different ecosystems. This is not an isolated incident but a coordinated campaign targeting the software supply chain at multiple points simultaneously.

For context, the 2024 Ultralytics compromise—which followed a similar CI/CD attack pattern—affected a package with far fewer monthly downloads. The LiteLLM attack represents an order-of-magnitude escalation in both target value and potential blast radius. The 10+ downstream projects that issued emergency patches (including DSPy, MLflow, OpenHands, and CrewAI) represent some of the most widely used AI/ML frameworks, amplifying the transitive dependency risk that Andrej Karpathy highlighted.

Impacts & What's Next

In the short term, any organization that installed LiteLLM 1.82.7 or 1.82.8 faces a critical incident response. Beyond uninstalling the package, they must check for and remove the persistent .pth file and systemd backdoor, rotate all potentially exposed credentials (cloud, SSH, Kubernetes, API keys), audit Kubernetes clusters for unauthorized privileged pods, and scan for lateral movement. The 3-hour window creates urgency but also a bounded scope for investigation.

In the medium term, LiteLLM's decision to pause all releases pending a supply chain review will disrupt the AI development ecosystem. Organizations relying on LiteLLM for production LLM API routing will need to freeze their current (clean) versions or evaluate alternatives. The 10+ downstream projects that issued emergency patches demonstrate the cascading disruption a single compromised dependency can cause. Google Mandiant's engagement suggests the forensic investigation could reveal additional compromised infrastructure.

In the long term, this attack will accelerate adoption of OIDC-based PyPI publishing (Trusted Publishers), which eliminates long-lived API tokens from CI/CD pipelines. It will also drive demand for runtime integrity monitoring, .pth file auditing, and more granular dependency pinning with hash verification. The Python ecosystem may implement structural changes to how .pth files are processed, given their now-demonstrated risk as an attack surface. The broader trend of supply chain attacks targeting AI infrastructure specifically is likely to intensify as AI adoption grows.

The Bigger Picture

This attack crystallizes a fundamental tension in the modern software ecosystem: the tools we build to accelerate development and the tools we build to secure it share the same fragile trust infrastructure. TeamPCP's campaign is notable not just for its technical sophistication but for its strategic targeting—compromising security scanners (Trivy, Checkmarx) before moving to high-value application packages (LiteLLM). By poisoning the security tools first, they degraded the ecosystem's ability to detect subsequent attacks.

The AI infrastructure layer is particularly vulnerable because it sits at the intersection of two trends: rapid adoption driven by competitive pressure, and deep integration with sensitive systems (cloud APIs, model serving infrastructure, data pipelines). LiteLLM's presence in 36% of cloud environments illustrates how quickly AI tooling has become load-bearing infrastructure, often without commensurate security investment.

As Guillaume Valadon of GitGuardian emphasized, the core failure was not the initial breach but the incomplete remediation that allowed one compromise to chain into the next. This pattern—where partial cleanup enables campaign persistence—is the defining challenge of supply chain security. The industry must shift from reactive incident response to proactive credential lifecycle management, where every secret exposed in a breach is rotated immediately and comprehensively, no matter the operational cost. The alternative, as this campaign demonstrates, is an expanding blast radius where each compromise fuels the next.

Historical Context

2024-12-01
A similar supply chain attack compromised the Ultralytics PyPI package through CI/CD pipeline manipulation, establishing a precedent for the attack pattern later used against LiteLLM.
2025-12-01
TeamPCP began operations as a threat actor group affiliated with LAPSUS$, targeting open-source supply chains with increasingly sophisticated CI/CD compromise techniques.
2026-02-28
TeamPCP compromised Trivy's CI/CD pipeline using an AI-powered attack tool called hackerbot-claw, gaining access to secrets that would later enable the LiteLLM and Checkmarx attacks.
2026-03-19
TeamPCP force-pushed 76 of 77 Trivy version tags on GitHub, injecting malicious code into what appeared to be legitimate scanner releases.
2026-03-23
35 Checkmarx KICS GitHub Action tags were hijacked by TeamPCP, extending the supply chain compromise to another major security tooling vendor.
2026-03-24
Malicious LiteLLM versions 1.82.7 and 1.82.8 were published to PyPI using stolen credentials, containing a three-stage credential-stealing and backdoor payload that was quarantined within approximately 3 hours.

Power Map

Key Players
Subject

LiteLLM PyPI Supply Chain Attack Steals Cloud Credentials

LI

LiteLLM / BerriAI

Primary victim; maintainer of the compromised open-source LLM proxy library with 97M monthly PyPI downloads and 100+ LLM API integrations

TE

TeamPCP (LAPSUS$ affiliate)

Threat actor behind the campaign, operating since December 2025 under aliases PCPcat, Persy_PCP, ShellForce, and DeadCatx3

AQ

Aqua Security (Trivy)

Initial supply chain victim; their Trivy scanner was compromised on Feb 28, 2026 and used as the entry point to steal LiteLLM's PyPI publishing credentials

CH

Checkmarx

Secondary victim; 35 KICS GitHub Action tags were hijacked on March 23, 2026 as part of the same campaign

PY

PyPI

Package registry that quarantined the malicious versions within approximately 3 hours of publication

GO

Google Mandiant

Engaged by LiteLLM for forensic analysis of the breach and incident response

WI

Wiz Research

Security firm that provided detailed technical analysis and found LiteLLM present in 36% of cloud environments

DO

Downstream projects (DSPy, MLflow, OpenHands, CrewAI)

At least 10 major AI/ML frameworks that depend on LiteLLM and issued emergency security PRs to pin or remove affected versions

THE SIGNAL.

Analysts

"Described the open-source supply chain as 'collapsing in on itself,' highlighting how a single compromised CI/CD credential can cascade through multiple ecosystems and thousands of downstream consumers."

Gal Nagli
Security Researcher, Wiz

"Argued that 'the bigger lesson is that incomplete cleanup turns one breach into a campaign' and that 'the hard problem is no longer finding a secret after it leaks—the hard problem is stopping that secret from becoming the attacker’s next foothold,' emphasizing that the Trivy-to-LiteLLM chain was enabled by inadequate secret rotation after the initial compromise."

Guillaume Valadon
Security Researcher, GitGuardian

"Characterized the payload as a sophisticated 'three-stage attack' that not only stole credentials but deployed 'privileged pods to every node' in Kubernetes clusters, enabling lateral movement far beyond the initial infection vector."

Kiran Raj
Security Researcher, Endor Labs

"Found that LiteLLM is present in 36% of cloud environments and highlighted the .pth file technique as an underappreciated attack surface in the Python ecosystem, noting that it persists even if the malicious package is uninstalled."

Wiz Research Team (Benjamin Read, Merav Bar, Rami McCarthy, James Haughom)
Researchers, Wiz

"Called the attack 'software horror' on X.com, warning about the risk of deep dependency tree poisoning and the fragility of the AI infrastructure ecosystem that relies heavily on transitive open-source dependencies."

Andrej Karpathy
AI Researcher, formerly OpenAI/Tesla

"Confirmed PyPI's quarantine of the compromised package on X.com, contributing to rapid community awareness of the incident."

Simon Willison
Open Source Developer, Creator of Datasette
The Crowd

"Software horror: litellm PyPI supply chain attack. Simple pip install litellm was enough to exfiltrate SSH keys, AWS/GCP/Azure creds, Kubernetes configs, git credentials, env vars, shell history, crypto wallets, SSL private keys, CI/CD secrets, database passwords."

@@karpathy0

"Whoa whoa whoa. Everyone CLAM down for a second. Earlier today someone broke the news that there was a supply chain attack impacting LiteLLM which had over 97 MILLION installs. Initially it was reported the payload was vibe coded which resulted in the payload failing. HOWEVER..."

@@vxunderground0

"Thankfully the LiteLLM package has now been marked as quarantined on PyPI so attempting to install the compromised update via pip et al should not work."

@@simonw0

"LiteLLM PyPI package compromised - versions 1.82.7 and 1.82.8 contain credential-stealing malware"

@u/futuresearch_dev2847
Broadcast
BREAKING: LiteLLM Has Been Compromised - What You Need to Know and Do Immediately

BREAKING: LiteLLM Has Been Compromised - What You Need to Know and Do Immediately

LiteLLM hack: Big brain target for hackers

LiteLLM hack: Big brain target for hackers

Trivy compromise - A Scanner Became a Weapon

Trivy compromise - A Scanner Became a Weapon