Skip to main content

The LiteLLM PyPI Compromise: How Stolen CI Credentials Reportedly Reached an AI Gateway

· 9 min read
Ankush K
Co-founder and CTO, Dwaar
The LiteLLM PyPI Compromise: How Stolen CI Credentials Reportedly Reached an AI Gateway

If anything you run installed or upgraded litellm without a pin on March 24, treat every secret on that machine as stolen. LiteLLM is an AI gateway, so the environment it lives in tends to hold your model provider keys, with cloud and database credentials close by. That is exactly what this payload went looking for.

FieldStatus as of 2026-03-26
IdentifierPYSEC-2026-2, GHSA-5mg7-485q-xm76 and MAL-2026-2144. None lists a CVE alias. The linked CVE is CVE-2026-33634, filed for the upstream CI compromise
Affectedlitellm 1.82.7 and 1.82.8 on PyPI
Fixed inNo fixed release yet. Both versions were removed from PyPI, and 1.82.6 is the latest clean release
SeverityNo CVSS score on any LiteLLM advisory. PYSEC-2026-2 carries no rating; GitHub's advisory GHSA-5mg7-485q-xm76 rates it Critical (2026-03-25). The linked CVE-2026-33634 has a CVSS 4.0 score of 9.4 Critical from GitHub and, from 2026-03-26, a CVSS 3.1 score of 8.8 High from NVD
ExploitedYes, malicious by design, with scale unverified. No CISA KEV entry names LiteLLM as vendor or product, but the linked CVE-2026-33634 was added to KEV on 2026-03-26
Disclosed2026-03-24, PYSEC-2026-2 published 15:35 UTC

What the two releases did​

The maintainers say initial evidence suggests both versions were uploaded directly to PyPI, bypassing CI/CD, and FutureSearch found no matching tag or release on GitHub for 1.82.8.

Version 1.82.7 carries a base64 payload in litellm/proxy/proxy_server.py that BleepingComputer describes as running on module import. PyPA's advisory says import of any module. Treat any install as fired.

Version 1.82.8 adds litellm_init.pth. Python runs import lines in a .pth file at interpreter startup, so the payload fires at every Python start in that environment, even if nothing ever imports litellm.

FutureSearch reports that the launcher spawns a child Python process, which triggers the .pth again, and the resulting fork bomb crashed the machine. It calls this "a bug in the malware", and it is how the package, a transitive dependency of an MCP plugin in Cursor, was found. A tidier payload would not have announced itself.

Per FutureSearch, BleepingComputer and PYSEC-2026-2:

  • Collection: SSH keys, .env files, AWS, GCP and Azure credentials, Kubernetes configs and tokens, database passwords, shell history, wallets, cloud metadata endpoints and AWS Secrets Manager.
  • Exfiltration: a tar archive named tpcp.tar.gz, encrypted with AES-256-CBC and a hardcoded 4096-bit RSA key, sent to models.litellm[.]cloud, which is not LiteLLM infrastructure.
  • Persistence: ~/.config/sysmon/sysmon.py, run by a systemd user service called "System Telemetry Service" that polls a second attacker domain for more payloads.
  • Kubernetes: reads secrets across namespaces, then creates a privileged alpine:latest pod per node in kube-system with the host filesystem mounted.

How the token got out​

This is the maintainers' working account, not a finished forensic report. Krrish Dholakia wrote on Hacker News that the PYPI_PUBLISH token "was in our github project as an env var" and got sent to a third party dependency used in CI/CD. "Our accounts had 2fa, so it's a bad token here." LiteLLM's own page is softer: it says "we believe" the compromise originated from a dependency in its CI/CD workflow, and that a maintainer's PyPI account "may have been compromised". PyPA's advisory puts the uploads after an API token exposure from an exploited dependency. I read the token as the leading explanation.

BleepingComputer reports that the attack has been claimed by a group called TeamPCP. That is a claim relayed by press, not a finding. It reports about 500,000 exfiltrations from unnamed sources, many of them duplicates, and a VX-Underground figure of a similar number of infected devices. It could not confirm either, so I would not quote a victim count yet.

The exposure window needs care too. The maintainers' page gives March 24 between 10:39 and 16:00 UTC. FutureSearch puts the 1.82.8 upload at 10:52 UTC, and Dholakia wrote at about 14:08 UTC that the package was in quarantine on PyPI, which blocks all downloads. Search all of March 24 anyway.

What to do now​

  1. Find it. Look for both versions in environments, CI/CD pipelines, Docker builds and deployment logs, and search site-packages for litellm_init.pth. Include transitive use through agent frameworks, MCP servers and orchestration tools.
  2. Know what is clear. The maintainers list LiteLLM Cloud, the official ghcr.io/berriai/litellm image, GitHub source installs, and 1.82.6 or earlier (if not upgraded in the window) as not affected. An image you built with an unpinned install that day is not covered.
  3. Pin to 1.82.6 or earlier. There is no fixed version yet.
  4. Rotate first, clean second. Where either version ran, isolate the environment and rotate everything it could reach. PyPA's position, in PYSEC-2026-2, is that anyone who installed and ran the project "should assume any credentials available to litellm environment may have been exposed". Put every LLM provider key at the top of that list.
  5. Hunt persistence. Remove litellm_init.pth, then look for ~/.config/sysmon/sysmon.py, the "System Telemetry Service" unit, /tmp/pglog, /tmp/.pg_state and tpcp.tar.gz.
  6. Read egress logs and clusters. Search for models.litellm[.]cloud and the second domain listed in PYSEC-2026-2, and for unexplained privileged alpine:latest pods in kube-system.
  7. Check your own CI. List the jobs that run third party steps and the secrets each can read. Anything pinned only by tag that can read a publishing credential goes first.

The lesson is about what your pipeline trusts​

No third party CI step has any business seeing a publishing token. Everything in a CI job runs with that job's secrets, and a version tag is a pointer somebody else can move. Pin third party actions to full commit SHAs, and publish from a separate job that holds the publishing credential and runs nothing else. If the token account holds, a publishing token stored in repo configuration would explain why 2FA did not help. Dholakia wrote that the team is reviewing options including trusted publishing, which is the right direction. I wrote that scanning alone is not a security program. Here, on the maintainers' account, a CI step was the way in, so the pipeline belongs in the review too.

A queue driven by CVE, CVSS, EPSS or KEV would have been late here. None of the package's own advisories lists a CVE. The only link is CVE-2026-33634, the CVE for the upstream CI compromise, whose record picked up LiteLLM references on March 25. NVD mapped litellm 1.82.7 and 1.82.8 to it on March 26, two days after the exposure, and CISA added it to KEV the same day. The one severity rating on the package's own advisories is Critical, in GitHub's advisory GHSA-5mg7-485q-xm76, published on March 25, about a day after the exposure. I stand by what I wrote about using EPSS and KEV over raw CVSS, but those signals hang off CVE identifiers, and the package's advisories carry none. The one CVE that reaches these versions is about the upstream compromise, and it reached them after the exposure window had closed. Call-graph reachability does not save you either, because a .pth file runs without any import. The first question here is plain inventory: where does this package run?

That is hardest for AI tooling, where a gateway can arrive as a dependency of a plugin. Discovering what you ship from source control, registries and cloud accounts, scanning it, and putting the results in one findings list is the problem Dwaar works on.

Run this check on your own systems today. Ask which of your environments resolve litellm, directly or transitively, and what version each installed on March 24. Then ask which CI jobs can read a publishing credential, and which of their third party actions are pinned only by tag. If those answers take more than an afternoon, that is your real gap.

References​