Skip to main content
Back
IntrusionAWS · Google Cloud · Azure · Kubernetes
9 min read

LiteLLM PyPI releases with a credential stealer, attributed to TeamPCP

Victim
LiteLLM (BerriAI) and the users who installed the two releases
When
Token taken on or after Mar 19, 2026 – Mar 24, 2026Disclosed Mar 24, 2026
Entry
A compromised, unpinned Trivy scanner in LiteLLM's CI read the static PyPI publishing token from the environment, and the token was used to upload two malicious releases to PyPI, by LiteLLM's and PyPA's account.

LiteLLM says a compromised, unpinned Trivy scanner in its CI read the static PyPI, GHCR and Docker release secrets from a shared environment, and PyPA's advisory ties the releases to an API token exposed by that Trivy dependency. On March 24, 2026 the token was used outside the release workflow to upload litellm 1.82.7 and 1.82.8 to PyPI; the payload ran on import or at every Python start, read credential files, asked AWS for role credentials and secrets, tried to spread through Kubernetes clusters and posted an encrypted archive out. PyPI quarantined the releases within about 40 minutes to three hours by the sources' figures, and no source names an affected organization or confirms use of the harvested credentials.

What happened

External Parties
Collection domain
Polling endpoint
FutureSearch
Internet
Instance Metadata ServiceAWS role credentials
LiteLLM Build + Release Pipeline
Environments That Installed It
+ litellm project
+ two malicious releases
+ transitive installs
PyPI
PyPI Package Index
Trivy Scan Step
Static Release Secrets
Python Environment
AWS Secret Stores
Kubernetes API + Nodes

Replaying the LiteLLM March 2026 intrusion

  1. 1

    Scanner in the release pipeline

    Between Mar 19 and 24, 2026; upload Mar 24, 10:39 UTC

    An unpinned, compromised Trivy in LiteLLM's CI reads the static release secrets, and the PyPI token uploads two releases outside the release workflow.

  2. 2

    Install and run

    Mar 24, 2026, 10:39–16:00 UTC

    Unpinned direct and transitive installs pull the releases; one runs the payload when the proxy module is imported, the other at every Python start.

  3. 3

    Harvest in the cloud

    Mar 24, 2026, 10:39–16:00 UTC

    The payload reads local credential files, asks the instance metadata service and the container endpoint for AWS role credentials, and lists and reads AWS secrets.

  4. 4

    Spread through the cluster

    Mar 24, 2026, 10:39–16:00 UTC

    With the pod's service account token the payload lists Secrets in every namespace and creates a privileged pod in the system namespace on every node; Trend Micro says this spread was not confirmed exploited in the wild.

  5. 5

    Backdoor and exfiltration

    Mar 24, 2026, from 10:39 UTC

    A user service polls for a further payload, the encrypted archive is posted out, and a crash on the reporter's machine leads to the report and PyPI's quarantine.

Impact

Two malicious litellm releases were on PyPI on March 24, 2026 for between about 40 minutes and three hours by the sources' figures. In each environment that ran them, the payload sent an encrypted archive of its credentials to the attacker, asked AWS for role credentials and secrets, and in a cluster tried to read every Secret and start a privileged pod on every node. No source names an affected organization or confirms use of the harvested credentials.

Outcome

Where cloud-provider controls fit

The scanner, the release token, the package index and the install sit with the CI service, PyPI and the package manager, so no cloud control reaches them: pinning the scanner, keeping release secrets out of the scan step, PyPI trusted publishing and pinned, hashed dependencies are yours to set there. Once the payload runs, cloud controls bound what it takes: no new long-lived AWS keys, network conditions that refuse a replay of copied credentials from the attacker's network, metadata settings that keep pods away from the node's credentials, and roles scoped to the secrets they need. On Azure, no setting refuses a Key Vault read made with the workload's own token. In a cluster, a pod with no mounted token, an admission policy or GKE Autopilot bounds what the payload tries, where AWS and Azure controls do not reach. An egress allow list on AWS, Google Cloud, Azure or Oracle Cloud, or a NetworkPolicy in the cluster, bounds the POST that sends the archive out. The payload still reads what its own host may read: you own the rotation of every credential the environment held.

Could this have been prevented?

In hindsight, no control would have stopped it. 19 controls would have limited how far it went. 9 steps have no cloud-provider control. The counts below are control assessments, not attack stages: several can address the same step. The same replay with the controls in place before the incident shows where each phase would have been refused or bounded.

0
Prevented
19
Contained
9
Not covered

How it could have been prevented

The same replay with the controls in place. Green marks where a step is refused, blue where it is bounded, and red where no control reaches it. Open a row to read the control, why it acts, and its caveat.

External Parties
Collection domain
Polling endpoint
FutureSearch
Internet
Instance Metadata ServiceAWS role credentials
LiteLLM Build + Release Pipeline
Environments That Installed It
+ litellm project
+ two malicious releases
+ transitive installs
PyPI
PyPI Package Index
Trivy Scan Step
Static Release Secrets
Python Environment
AWS Secret Stores
Kubernetes API + Nodes

Replaying the LiteLLM March 2026 intrusion

1 · Scanner in the release pipeline

2 Not covered

2 · Install and run

1 Not covered

3 · Harvest in the cloud

12 Contained1 Not covered3 on other clouds

4 · Spread through the cluster

3 Contained3 Not covered1 on other clouds

5 · Backdoor and exfiltration

4 Contained2 Not covered1 on other clouds

Key facts

  • LiteLLM's CI scan step installed Trivy with no version pin or checksum and pulled the compromised release, which read the PyPI, GHCR and Docker release secrets kept as static environment variables in one shared CI environment, per LiteLLM and JFrog; the day it ran is not stated, and LiteLLM names CircleCI while Trend Micro names a GitHub Actions runner
  • LiteLLM says 1.82.7 and 1.82.8 went live on PyPI at 10:39 UTC on March 24, 2026, while Wiz gives about 08:30 UTC; FutureSearch saw 1.82.8 published at 10:52 UTC with no matching tag or release in the GitHub repository, and whether a hijacked maintainer account was also used is unconfirmed
  • 1.82.7 ran the payload when the proxy module was imported and 1.82.8 added a startup file that Python runs at every interpreter start, per LiteLLM and Wiz; the payload encrypted what it collected, posted it to a domain made to look like LiteLLM's and installed a user service that polled for a further payload about every 50 minutes, per JFrog
  • The payload read SSH keys, cloud credential files and Kubernetes tokens, asked the EC2 instance metadata service over IMDSv1 and IMDSv2 and the ECS container endpoint for role credentials, called Secrets Manager and Parameter Store, and with a service account token listed Secrets in every namespace and created a privileged pod on every node, per Trend Micro and JFrog; Trend Micro says the cluster spread was not confirmed exploited in the wild
  • PyPI quarantined the releases about 40 minutes after 10:39 UTC by LiteLLM's figure, at 11:25 UTC by Wiz's and about three hours after publication by Trend Micro's; LiteLLM and PyPI deleted them by 16:00 UTC, per LiteLLM
  • Wiz says LiteLLM is present in 36% of cloud environments; no source names an affected organization or confirms use of the harvested credentials, and the vendors attribute the campaign to TeamPCP by comparing its tooling and infrastructure with the earlier Trivy compromise

Sources

Every fact in this breakdown comes from the public reporting below. The replay is a model of that reporting, not a reconstruction of the environment it describes.

  1. 1.
    Security Update: Suspected Supply Chain IncidentLiteLLM · Mar 27, 2026 · Vendor reportaffected versions, publication window, root cause as believed, harvest targets, exfiltration in general, who is affected, response
  2. 2.
    Security townhall updatesLiteLLM · Mar 27, 2026 · Vendor reportroot cause, CI environment, release secrets, deletion window, scope of internal impact, remediation
  3. 3.
    PYSEC-2026-2: Two litellm versions published containing credential harvesting malwarePython Packaging Advisory Database (PyPA) · Mar 24, 2026 · Advisoryroot cause, affected versions, payload behavior, metadata and Secrets Manager access, persistence, Kubernetes pod
  4. 4.
    litellm PyPI supply chain attackFutureSearch · Mar 30, 2026 · Researchdiscovery, upload time, payload behavior, Kubernetes behavior, yank time
  5. 5.
    Three's a Crowd: TeamPCP Trojanizes LiteLLM in Continuation of CampaignWiz Research · Mar 24, 2026 · Researchdelivery mechanisms, harvest targets, encryption, timing, prevalence, attribution
  6. 6.
    LiteLLM supply chain attack backdoor analysisARMO · Mar 24, 2026 · Researchregenerated package metadata, Kubernetes precondition, payload stages
  7. 7.
    Popular litellm Python package is the latest victim of TeamPCP's ongoing supply chain attackJFrog Security Research · Mar 24, 2026 · Researchroot cause, payload stages, AWS metadata access, Kubernetes actions, persistence, exfiltration
  8. 8.
    Inside the LiteLLM supply chain compromiseTrend Micro (TrendAI) · Mar 26, 2026 · Researchpayload layers, AWS metadata access, AWS API calls, Kubernetes actions, persistence, exfiltration, no confirmed downstream use
  9. 9.
    LiteLLM compromised on PyPI in TeamPCP supply chain campaignDatadog Security Labs · Mar 27, 2026 · Researchcampaign context, delivery mechanisms, Kubernetes pods, no observed credential use

The estate in the replay is illustrative and drawn at the level of attack stages; the victim's real environment is not public. Verdicts describe what a control does when it is in place before the incident. They are not an assessment of the victim's security program.

More cloud attack breakdowns

All breakdowns