On 21 October 2026 an attacker published malicious litellm==1.107.0 wheels to PyPI and pushed compromised Docker Hub and GHCR images, live for about two hours. The release ran a credential stealer at every Python start through .pth and sitecustomize.py files. LiteLLM traced it to a master key committed to a public repository in May, which let the attacker pull a GitHub organization owner's token. Anyone who ran 1.107.0 should remove the files, reinstall 1.106.2 and rotate every credential the host could reach.
| Disclosed | October 21, 2026 |
|---|---|
| Earliest known activity | October 10, 2026 |
| Affected | LiteLLM (BerriAI), litellm, ghcr.io/berriai/litellm, PyPI, Docker Hub |
| Type | Supply chain |
| Status | Contained |
What was exposed
Any credential reachable from a host or container that ran the release. LiteLLM says the malware steals credentials and loads remote-code-execution tools, and its rotation guidance covers the instance or task IAM role, all model provider keys stored in the LiteLLM proxy database, LiteLLM master and virtual keys, the DATABASE_URL password and any secret in the environment of processes on the host. Microsoft found that the package added files Python runs during interpreter start, so the payload ran even if LiteLLM was never imported. Microsoft lists what the collector reads: auth and config files for AI assistants, IDEs, GitHub Copilot and MCP integrations; Git credentials, package-manager configs, .env and private key files; AWS, Azure and Google Cloud credential caches and metadata credentials; Kubernetes, Docker, Vault and CI/CD configs; SSH, GPG and TLS keys; process environments; and, on proxy hosts, provider credentials from the LiteLLM database. A detached daemon holding /tmp/remote_code_loader.lock kept running afterwards. The official v1.107.0 source tag does not contain the malicious files, and LiteLLM says its private enterprise registry was not affected.
Am I affected?
You are affected if you installed litellm==1.107.0 from PyPI between 11:39 and 13:23 UTC on 21 October 2026, or pulled Docker Hub or GHCR tags v1.107.0, latest, main-latest or main-stable (including the litellm-database and litellm-non_root images on GHCR) between 11:46 and 14:20 UTC. Look in site-packages for cook.pth, cook.py or sitecustomize.py, for __pycache__/cook*.pyc, and for a Python process holding /tmp/remote_code_loader.lock. In AWS, check CloudTrail for GetCallerIdentity from the instance role around install time.
What to do now
- Do not run
pip installfirst: any Python start re-runs the payload. From the shell, deletecook.pth,cook.py,sitecustomize.pyand matching.pycfiles from every affected site-packages directory. - Kill the detached Python process holding
/tmp/remote_code_loader.lock, then reinstall pinned tolitellm==1.106.2, preferably by rebuilding images and virtual environments. - Rotate the IAM role credentials, every provider key in the LiteLLM proxy database, LiteLLM master and virtual keys, the database password and all secrets in the host's environment.
- Review CloudTrail and provider usage for activity from outside your infrastructure after the install.
Keys to rotate
Guides to the credentials this incident put at risk:
- Rotate AWS (IAM access keys) keys
- Rotate OpenAI keys
- Rotate Anthropic keys
- Rotate Google Gemini API keys
- Rotate Azure (Microsoft Entra app client secrets) keys
- Rotate GitHub keys
Timeline
- A config file containing the master key for the LiteLLM Agent Platform is committed to a public repository and not revoked, per LiteLLM's root cause analysis. Source
- The attacker uses that key against the Agent Platform API, which returns a GitHub CLI OAuth token belonging to an organization owner; from 10 to 12 October CI workflows are used to take two maintainers' tokens. Source
- The release workflow is changed to build from the lookalike
Berri-AI/litellmfork; seven malicious wheels reach PyPI at 11:39 UTC and images at 11:46 UTC. PyPI removes the version by 13:23 UTC; GHCR tags are unavailable by 13:51 and Docker Hub tags are cleaned by 14:20 UTC. Source - LiteLLM publishes its canonical root cause analysis, correcting an earlier suspicion that the first token came from internal deployment logs. Microsoft publishes its analysis of the Python startup-hook technique the same day. Source
Indicators
From the advisories listed below. Use them to search your logs, lockfiles and workflow runs.
litellm==1.107.0wheels; filescook.pth,cook.py,sitecustomize.py,__pycache__/cook*.pyc./tmp/remote_code_loader.lockheld by a detached Python daemon.- Exfiltration to
www[.]litellm[.]devpath/healthcheck; loader readingraw.githubusercontent.com/letters9813/pythonclient-test/main/domain.txt. - Docker image index
sha256:1bbcb1443bc962e45f5aad53fe3d2c30600e0379715fb6c664cdd3ac126c339e; release provenance pointing toBerri-AI/litellminstead ofBerriAI/litellm.
What this changes for credential handling
- A master key committed to a public repo in May was still valid in October. BotPassword keeps keys out of config files and makes unused keys easy to find and rotate.
- An organization owner's long-lived CLI token was enough to override branch protection and release controls.
Frequently asked questions
Am I affected by the LiteLLM (BerriAI) incident?
You are affected if you installed litellm==1.107.0 from PyPI between 11:39 and 13:23 UTC on 21 October 2026, or pulled Docker Hub or GHCR tags v1.107.0, latest, main-latest or main-stable (including the litellm-database and litellm-non_root images on GHCR) between 11:46 and 14:20 UTC. Look in site-packages for cook.pth, cook.py or sitecustomize.py, for __pycache__/cook*.pyc, and for a Python process holding /tmp/remote_code_loader.lock. In AWS, check CloudTrail for GetCallerIdentity from the instance role around install time.
What was exposed in the LiteLLM (BerriAI) incident?
Any credential reachable from a host or container that ran the release. LiteLLM says the malware steals credentials and loads remote-code-execution tools, and its rotation guidance covers the instance or task IAM role, all model provider keys stored in the LiteLLM proxy database, LiteLLM master and virtual keys, the DATABASE_URL password and any secret in the environment of processes on the host. Microsoft found that the package added files Python runs during interpreter start, so the payload ran even if LiteLLM was never imported. Microsoft lists what the collector reads: auth and config files for AI assistants, IDEs, GitHub Copilot and MCP integrations; Git credentials, package-manager configs, .env and private key files; AWS, Azure and Google Cloud credential caches and metadata credentials; Kubernetes, Docker, Vault and CI/CD configs; SSH, GPG and TLS keys; process environments; and, on proxy hosts, provider credentials from the LiteLLM database. A detached daemon holding /tmp/remote_code_loader.lock kept running afterwards. The official v1.107.0 source tag does not contain the malicious files, and LiteLLM says its private enterprise registry was not affected.
Which keys should I rotate?
Rotate any AWS (IAM access keys), OpenAI, Anthropic, Google Gemini API, Azure (Microsoft Entra app client secrets), GitHub credentials that were reachable from affected systems, starting with the ones that can publish code or reach production.
Other supply-chain compromises
- tensorlake 0.5.144 on npm shipped a Shai-Hulud variant with a wipe-on-revoke dead-man's switch 2026-10-08
- keyv, flat-cache and cache-manager npm releases carried a CI-secret stealer with a revocation trap 2026-08-04
- 32 @redhat-cloud-services npm packages compromised after a VS Code extension hijacked a GitHub account 2026-06-01
- 14 typosquatted OpenSearch and DevOps npm packages stole AWS, Vault, GitHub Actions and npm secrets 2026-05-28
- Nx Console 18.95.0 VS Code extension shipped a credential stealer after a TanStack infection 2026-05-18
- TanStack npm compromise: 84 versions of 42 @tanstack packages stole cloud, GitHub and SSH credentials 2026-05-11