Security operations

LiteLLM Supply Chain Attack: What Happened to 1.107.0 (Oct 2026)

On October 21, 2026, LiteLLM's own release pipeline published a poisoned version 1.107.0 — validly signed, with a credential stealer that ran on every Python start. Here is the full timeline.

Cysoro Security TeamPublished · 9 min read
SECURITY OPERATIONS LiteLLM Supply Chain Attack Version 1.107.0, October 21, 2026 — signed, published, and poisoned. MALICIOUS VERSION litellm 1.107.0 Last clean version: 1.106.2 PyPI quarantined 1.107.0 Payload: cook.pth + cook.py Ran on every Python start CYSORO
Quick answer

The LiteLLM supply chain attack happened on October 21, 2026, when the project's own release pipeline published litellm 1.107.0 to PyPI and Docker Hub with a credential stealer and an hourly remote code loader in all seven wheels. The attacker had stolen a GitHub organization owner's token via an API key leaked in May, then pointed the pipeline at a look-alike fork, Berri-AI/litellm. The last clean version is 1.106.2.

Key takeaways

  • litellm 1.107.0, published October 21, 2026, shipped a credential stealer that ran on every Python start — even without importing litellm.
  • The release was validly signed with real provenance: signing proves an artifact came from the pipeline, not that the pipeline was trustworthy.
  • There is no CVE, because this was a malicious release, not a software flaw — scanners and patch reports will show nothing wrong.

On October 21, 2026, one of the most widely used AI gateway packages in the world shipped malware through its own front door. The poisoned litellm 1.107.0 was built, signed and published by LiteLLM's own release pipeline — with valid signatures and valid provenance. The source code was clean. The wheels were not.

What happened in the LiteLLM supply chain attack?

At 11:39 UTC on October 21, 2026, litellm 1.107.0 appeared on PyPI. All seven prebuilt wheels carried a credential stealer and an hourly remote code loader, and the same payload shipped in the official LiteLLM Docker images under the v1.107.0, latest, main-latest and main-stable tags.

LiteLLM is an open-source proxy and SDK that routes calls to more than 100 large language model providers through a single OpenAI-compatible API. That made it a high-value target: a LiteLLM proxy typically holds the API keys for every model provider an organization uses.

Chainguard reported that litellm had more than 100 million PyPI downloads in the preceding month, with more than 2,000 packages depending on it — so many teams install it without a direct reference. Read the full technical analysis on Chainguard's site.

DetailConfirmed fact
Malicious versionlitellm 1.107.0, all seven wheels (macOS, manylinux, musllinux, Windows) plus the sdist
PublishedOctober 21, 2026, 11:39:51 UTC
Docker imagesghcr.io/berriai/litellm, litellm-database, litellm-non_root; docker.io/litellm/litellm
Infected tagsv1.107.0, latest, main-latest, main-stable (11:46–14:20 UTC)
Last clean version1.106.2 (1.107.0rc1 and rc2 are also clean)
Payload filescook.pth, cook.py, sitecustomize.py in site-packages root
ExfiltrationEncrypted archive to www.litellm.dev/healthcheck
CVENone — a malicious release, not a vulnerability
StatusPyPI quarantined 1.107.0; clean releases resumed October 24

Chainguard's malware scanning flagged 1.107.0 just 16 minutes after release, at 11:55 UTC. The GHCR tags were made unavailable by 13:51 UTC and the Docker Hub tags were repointed to clean images at 14:20 UTC — but any install or image pull in that window was exposed.

How did the LiteLLM malware work?

The attack hid in the build configuration, not the source. One added line in the sdist's pyproject.toml — data = "cook" under the maturin build settings — told the build tool to copy a cook/ folder into each wheel. When pip installed the wheel, it placed three files in the root of site-packages: cook.pth, cook.py and sitecustomize.py.

Python processes .pth files at startup, so cook.pth — which contains one line, import cook — ran cook.py every time any Python process started in that environment. That includes pip, IDE language servers and scripts that never import litellm. The trigger is Python startup, not the import.

The payload ran before your code did1. pip installslitellm 1.107.0cook.pth, cook.py andsitecustomize.py land2. Python starts— any Python.pth files run first,before your code3. Stealer runs+ hourly loaderkeys leave forlitellm.devNo import of litellm is needed. Starting Python is enough.The loader checks a GitHub dead drop every hour for new code to run.On Windows the daemon fails (no os.fork) but the stealer still runs.
Python startup hooks turned an install into a compromise. Illustration by Cysoro.

The stealer, which calls itself privcollect, collected SSH, GPG and TLS private keys, shell histories, browser passwords and cookies, AWS, Azure and Google Cloud credentials, Kubernetes configs and service account tokens, Docker secrets and package registry tokens.

It also took CI/CD secrets from GitLab Runner, Jenkins, Vault, Terraform and Packer, configuration from more than 15 AI coding tools, and — most damaging for an AI gateway — the LiteLLM proxy database tables holding upstream provider API keys. The stolen data was encrypted with AES-256-CBC, wrapped with an RSA-4096 public key, and sent as a tar.gz archive over plain HTTP to www.litellm.dev, a look-alike domain that is not the real litellm.ai.

The second payload, sitecustomize.py, forked a detached daemon on Linux and macOS that checked a GitHub dead drop every hour and ran whatever Python code the attacker served, with no integrity check. Security firm Wiz observed that less than five hours after the malicious release was published, the attackers began using stolen AWS credentials to call bedrock:ListFoundationModels.

How did the attacker get into the release pipeline?

The October attack was not a compromised dependency. It was an infrastructure compromise that started months earlier, with a leaked key that was never revoked.

According to LiteLLM's own root cause analysis, published October 23, an administrative API key for an internal experimental service had been inadvertently committed to a public repository in May 2026. That service in turn held the GitHub CLI OAuth token of one of LiteLLM's two organization owners.

The leaked key was never revoked, and the initial ingress happened on October 10. With the owner token, the attacker was an organization owner — able to change almost anything in the GitHub organization, including pipeline code, branch protections, required checks and approval rules.

The attacker pushed a change to LiteLLM's private release repository so the pipeline pulled source from their fork, Berri-AI/litellm, instead of BerriAI/litellm — a name differing by one hyphen. They pushed the change past branch protection with the owner token, dispatched the pipeline, and approved the production gate with a second stolen token.

The pipeline, otherwise unchanged, built the fork, signed the images with LiteLLM's cosign key, and published everything with its Trusted Publisher identity. The result: a malicious release with valid signatures and valid provenance.

LiteLLM's security team put the lesson bluntly: Trusted Publishing and signing prove that an artifact came from the pipeline — but no pipeline control can defend against an attacker who is an organization owner, because the owner owns the pipeline.

How does this compare to the March 2026 LiteLLM attack?

October was the second LiteLLM supply chain compromise in seven months, but the two attacks used substantially different surfaces — which is why the controls built after March did not stop October.

March 2026October 2026
Malicious versions1.82.7 and 1.82.81.107.0
AttributionTeamPCP groupNot attributed to TeamPCP or any named actor
Entry pointCompromised Trivy dependency running unpinned in CIAPI key leaked to a public repo in May, never revoked
What the attacker heldStatic PyPI, GHCR and Docker credentials from CI environment variablesA GitHub organization owner's token, then more tokens
What the pipeline didNothing — the attacker published directly with stolen keysBuilt, signed and published attacker source through the normal path
ArtifactsUnsigned, published outside the pipelineValidly signed, valid Trusted Publishing provenance

After March, LiteLLM rebuilt its pipeline as CI/CD v2: isolated stages, validation and release split into separate repositories, static PyPI credentials replaced with Trusted Publishing, container images signed with cosign, immutable release tags, pinned GitHub Actions and automated scanning on every pull request.

Those controls worked as designed — existing release tags could not be overwritten, which lessened the impact — but they could not fully prevent an attack by someone holding an owner token. The March controls defended against supply chain attacks; October was an infrastructure compromise.

How do I know if I am affected?

If you installed litellm 1.107.0 from a wheel, or ran a LiteLLM container pulled on October 21, treat that host as fully compromised. A lockfile match alone needs investigation, even if your application never imports litellm — the trigger is Python startup, not the import.

Do not run Python or pip inside an environment you suspect. Each Python start runs the payload again. Use shell tools for every check:

  1. Search for the startup files: look for cook.pth, cook.py and sitecustomize.py in site-packages. Some environments have a legitimate sitecustomize.py — inspect any match before deleting it.
  2. Search lockfiles: grep requirements files, poetry.lock, uv.lock and pyproject.toml for litellm 1.107.0.
  3. Look for host markers: /tmp/.pc_once_72129118c59f5636c0bb (written after a successful exfiltration — if it exists, assume your secrets are gone), /tmp/remote_code_loader.lock and /tmp/.pc_sq_* and /tmp/.pc_e_* files.
  4. Check image digests: list your LiteLLM images by digest and compare them with the published digests for v1.107.0.
  5. Search logs: DNS and proxy logs for www.litellm.dev and for the dead-drop path letters9813/pythonclient-test.

MITRE tracks this technique as T1546.018, Python Startup Hooks. If you find the files or the marker, skip straight to the response steps below — checking further only wastes time while credentials sit exposed.

What should you do if you installed 1.107.0?

There is no patch for this incident, because there is no vulnerability to fix. The response is containment and credential rotation, not an upgrade cycle.

If you installed 1.107.0: respond in this order1Isolate the host or containertreat every reachable credential as compromised2Remove the startup files with shell toolsnever run pip uninstall first — it starts Python and runs the payload3Stop the loader daemonkill the detached process holding /tmp/remote_code_loader.lock4Block litellm.dev and rotate everythingcloud keys, SSH keys, provider keys, master and virtual keysStep 5: rebuild environments and images from verified artifacts, pinned by digest.
Containment and rotation, not a patch cycle. Illustration by Cysoro.
  1. Isolate the host or container. Treat every credential and every file the host could reach as compromised.
  2. Remove the startup files before you run Python again. Delete cook.pth, cook.py and sitecustomize.py, their files in __pycache__, and the /tmp markers — with shell tools. A pip uninstall starts Python and runs the payload again.
  3. Stop the loader. Find and stop each detached Python process holding /tmp/remote_code_loader.lock.
  4. Block egress to www.litellm.dev, the dead-drop URL and any domain it returned. Keep DNS, proxy, endpoint and cloud audit logs.
  5. Rotate exposed credentials: SSH and GPG keys, TLS private keys, cloud and Kubernetes credentials, package publish tokens, source control tokens, AI tool tokens, browser-saved passwords, DATABASE_URL, LiteLLM master and virtual keys, and every provider key in the proxy database.
  6. Investigate any request to /codepy. That stage can run any code, so the stealer's behavior does not limit its effects.
  7. Rebuild virtual environments, hosts and images from verified artifacts. Pin litellm==1.106.2 or a later clean release, and pin Docker images by digest, not by the latest tag.
Do not run pip uninstall in a suspected environmentUninstalling with pip starts Python, which runs the payload again. Remove the startup files with shell tools first, then rebuild the environment from scratch.

What should teams learn from the LiteLLM attack?

Three lessons apply to any team that depends on open-source packages — which is every team.

  • Review the artifact, not just the source. The Git tag pointed to an ordinary signed commit and the sdist had no payload files. A team that reviews only source code, a Git tag or an sdist misses this attack. The wheel is the artifact that runs, so the wheel is the artifact you must trust — verify hashes, and compare published wheels against the tagged source.
  • Signing is not a safety verdict. Valid signatures and Trusted Publishing provenance proved 1.107.0 came from LiteLLM's pipeline. They said nothing about whether the pipeline itself was trustworthy. Build provenance answers "who built this"; it cannot answer "was the builder compromised".
  • Secrets need revocation, not just scanning. The May leak was the root cause, and the key was never revoked. Secret scanning that finds a leak but does not force revocation is a report, not a control. LiteLLM has since committed to ticketed revocations where a scanning alert opens a ticket that only closes when revocation is confirmed.

LiteLLM's own response list, published October 30, runs to 25 commitments: no human day-to-day account is an organization owner, owner accounts cannot use tokens or OAuth apps, and GitHub audit logs stream to Splunk.

A post-publish verifier running outside GitHub will download every published wheel and image and compare it with the tag — and automatically yank releases on mismatch. Those are the controls that would have caught this attack. The broader point stands for every publisher: a package's clean history does not predict a clean next release.

For your own stack, the practical defenses are pinning and verification: pin dependencies to exact versions with hashes, pin container images by digest, verify wheels against published hashes, and keep a cooldown between a new release and your adoption of it. You can check the integrity of a downloaded file with our free hash generator.

Review our small business cybersecurity checklist for the wider supply-chain basics.

The bottom line

The LiteLLM supply chain attack was not a bug in LiteLLM's code. It was a leaked key, an unrevoked credential, and an owner token that let an attacker turn LiteLLM's own pipeline into a malware distributor — with valid signatures. The damage was done in hours: credentials stolen, AWS keys used within five hours, and no CVE to flag it in any scanner.

If you ran litellm 1.107.0, isolate the host, remove the startup files with shell tools, and rotate every credential it could reach. Then pin your dependencies, verify your artifacts, and assume the next release of any package you depend on needs checking too. You can start with the hash generator to verify what you download.

Frequently asked questions

What is the LiteLLM supply chain attack?

It is the October 21, 2026 compromise in which a malicious litellm version 1.107.0 was published to PyPI and Docker Hub through LiteLLM's own release pipeline. The wheels contained a credential stealer and an hourly remote code loader. It was the second LiteLLM supply chain compromise of 2026, after the March incident involving versions 1.82.7 and 1.82.8.

Which LiteLLM versions are affected?

Only litellm 1.107.0 is affected: all seven PyPI wheels, plus the ghcr.io/berriai/litellm, litellm-database and litellm-non_root images and docker.io/litellm/litellm under the v1.107.0, latest, main-latest and main-stable tags. The last clean release is 1.106.2, and the 1.107.0 release candidates are clean. PyPI has quarantined 1.107.0.

Why is there no CVE for the LiteLLM attack?

CVE identifiers are assigned to flaws in software, not to malicious releases of otherwise sound code. The LiteLLM source code was clean — the poison was added to the build artifacts. That means vulnerability scanners and patch management reports will show nothing wrong, which is exactly why this class of attack is dangerous.

How do I know if I installed the malicious LiteLLM version?

Search your site-packages for cook.pth, cook.py and sitecustomize.py, check lockfiles for litellm 1.107.0, look for the marker file /tmp/.pc_once_72129118c59f5636c0bb and the lock /tmp/remote_code_loader.lock, and search DNS and proxy logs for www.litellm.dev. Do not run Python inside a suspected environment to check — every Python start runs the payload again.

What did the LiteLLM malware steal?

The stealer, which calls itself privcollect, collected SSH, GPG and TLS private keys, shell histories, browser passwords and cookies, AWS, Azure and Google Cloud credentials, Kubernetes configs and tokens, Docker secrets, package registry tokens, CI/CD secrets, configuration from more than 15 AI coding tools, and the LiteLLM proxy database tables holding upstream provider API keys.

How did the attacker get into LiteLLM's release pipeline?

An administrative API key for an internal experimental service was accidentally committed to a public repository in May 2026 and never revoked. That service held the GitHub CLI OAuth token of one of LiteLLM's two organization owners. With that token the attacker became an organization owner, changed the private release repository to build from a look-alike fork, and pushed the change past branch protection.

What happened in the March 2026 LiteLLM attack?

In March 2026, the TeamPCP group published malicious litellm versions 1.82.7 and 1.82.8 using a stolen PyPI token. The token was stolen through a compromised Trivy scanner that ran unpinned inside LiteLLM's CI and read the static PyPI, GHCR and Docker release credentials from environment variables. LiteLLM rebuilt its pipeline afterward, but the October attack used a different surface.

Is LiteLLM safe to use now?

Clean releases resumed on October 24, 2026, and the poisoned 1.107.0 has been quarantined on PyPI with the affected Docker images removed. The safe course is to pin a clean release such as 1.106.2 or later, pin Docker images by digest rather than by the latest tag, and verify wheels against the published hashes before installing.

Sources

  1. LiteLLM — What we are changing after October 21
  2. Chainguard — LiteLLM attacked again: Malicious 1.107.0 wheels on PyPI and Docker Hub (October 2026)
  3. StepSecurity — litellm 1.107.0 Compromised on PyPI and Docker: Credential Stealer and Hourly Remote Code Loader
  4. GitHub — BerriAI/litellm issue #47826
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against LiteLLM's own incident response post, Chainguard's technical analysis of the malicious wheels, and StepSecurity's compromise write-up.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free