Supply chain · October 21, 2026

LiteLLM 1.107.0 on PyPI and Docker carried a credential stealer after a leaked master key

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.

DisclosedOctober 21, 2026
Earliest known activityOctober 10, 2026
AffectedLiteLLM (BerriAI), litellm, ghcr.io/berriai/litellm, PyPI, Docker Hub
TypeSupply chain
StatusContained

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

  1. Do not run pip install first: any Python start re-runs the payload. From the shell, delete cook.pth, cook.py, sitecustomize.py and matching .pyc files from every affected site-packages directory.
  2. Kill the detached Python process holding /tmp/remote_code_loader.lock, then reinstall pinned to litellm==1.106.2, preferably by rebuilding images and virtual environments.
  3. 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.
  4. 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:

Timeline

  1. 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
  2. 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
  3. The release workflow is changed to build from the lookalike Berri-AI/litellm fork; 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
  4. 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.0 wheels; files cook.pth, cook.py, sitecustomize.py, __pycache__/cook*.pyc.
  • /tmp/remote_code_loader.lock held by a detached Python daemon.
  • Exfiltration to www[.]litellm[.]dev path /healthcheck; loader reading raw.githubusercontent.com/letters9813/pythonclient-test/main/domain.txt.
  • Docker image index sha256:1bbcb1443bc962e45f5aad53fe3d2c30600e0379715fb6c664cdd3ac126c339e; release provenance pointing to Berri-AI/litellm instead of BerriAI/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.

Keep keys out of reach of the next compromised package

BotPassword is in early access. Request an invite and we'll email you when your spot opens.