rotateit

All incidents

Malicious LiteLLM 1.107.0 on PyPI

Disclosed Oct 21, 2026 · updated Oct 30, 2026 · critical · Active

LiteLLM 1.107.0 stole keys.

Are you affected?

The free scanner that answers this opens soon. Until then, the steps below work by hand.

What happened

Malicious LiteLLM 1.107.0 stole credentials. It also loaded remote code. LiteLLM says it was published to PyPI on 2026-10-21 from 11:39 UTC (removed at 13:23) and to Docker Hub and GHCR as v1.107.0, latest, main-latest and main-stable from 11:46 UTC (gone by 13:51 on GHCR and 14:20 on Docker Hub); it is in OSV MAL-2026-2144. The v1.107.0 git tag does not contain the payload. LiteLLM says an attacker used an Agent Platform admin key left in a public repository since May to get an organization owner's GitHub CLI token, stole two more maintainers' tokens through CI workflows, and used them to trigger the release from a lookalike fork and approve its production gate. Three extra files run at every Python interpreter start, without litellm being imported: cook.pth, cook.py, a stealer that collects browser credentials, cloud credentials and instance metadata, SSH, GPG and TLS keys, Kubernetes, Docker, Vault and CI secrets, AI developer tool credentials and configuration, .npmrc, .pypirc, .git-credentials, environment variables and up to 500 provider credentials from a LiteLLM proxy database, and sitecustomize.py, an hourly remote-code loader. Wiz saw stolen AWS instance-role credentials tested about 4.5 hours later.

Exposure starts
2026-10-21
Exposure ends
2026-10-21
Confidence
high
Scope
every credential readable on any machine or CI runner where litellm 1.107.0 was installed

What to do, in this order

  1. Isolate affected machines and runners; without running Python or pip there, delete cook.pth, cook.py, sitecustomize.py and their __pycache__ files and kill the daemon holding /tmp/remote_code_loader.lock

    The payload runs at every interpreter start and loads remote code hourly, so it would steal any new credential you create on that host. LiteLLM and Microsoft both say not to start Python in the affected environment first; Microsoft says to rotate afterwards from a clean machine.

  2. Cloud credentials (AWS, GCP, Azure) and instance-role access

    The stealer collects cloud credentials and queries instance metadata, and cloud keys reach everything else.

    aws_access_key_id, aws_secret_access_key

  3. Source-control and package-registry tokens (GitHub, npm, PyPI)

    .git-credentials, .npmrc and .pypirc were collected.

    github_pat, github_oauth_token, github_fine_grained_pat, npm_token

  4. AI provider keys, including provider keys held in the LiteLLM proxy database and LiteLLM master and virtual keys, and AI coding tool sign-ins

    The stealer reads up to 500 rows of provider credentials from the proxy database (Wiz, Microsoft); LiteLLM and JFrog say to rotate them.

    openai_api_key, anthropic_api_key, openai_session_token, gemini_api_key

  5. Database URLs, SSH keys, TLS keys and every other environment variable or secret on the host

    The payload collected environment variables and private keys wholesale.

    postgres_url, mysql_url, redis_url, mongodb_url, private_key, anything else stored there

  6. Rebuild from known-clean artifacts, pinned to an unaffected version

    OSV lists 1.106.2 and 1.107.0rc1/rc2 as not affected; reinstalling over a dirty environment can keep the hooks.

Notes

  • OSV says any environment where 1.107.0 was installed should be treated as compromised and its credentials rotated.
  • JFrog says not to start cleanup by running pip inside an affected environment, because starting Python can re-run the payload. PyPI removed 1.107.0.
  • The exposure window ends on the malicious upload. A credential changed after 2026-10-21 on a host that is still infected is also exposed, because the loader keeps running until the host is cleaned.
  • Which AI tools: JFrog names credentials and configurations for Cursor, Claude, Codex, Gemini and GitHub Copilot among more than a dozen others, and OSV names ~/.cursor, ~/.claude, ~/.kiro and Windsurf. Microsoft describes authentication and configuration files for AI assistants, IDEs, GitHub Copilot, VS Code and MCP integrations without naming Claude, Codex, Gemini or Cursor, and Wiz says only "AI tool secrets".
  • LiteLLM says to rotate the instance or task IAM role, every provider key stored in the LiteLLM proxy database, master and virtual keys, the DATABASE_URL password and any secret in the environment of any process on the host, and to assume exfiltration on any host with outbound internet even if the marker file is absent. Microsoft says to rotate from a clean machine and revoke affected sessions.
  • The Docker images cannot be expressed as packages in this schema, so a host that ran the compromised image with no lockfile entry is not matched. Wiz counts about 49,000 downloads of the PyPI release.

How to tell if you’re affected

  • litellm 1.107.0 in a lockfile, requirements file or installed environment
  • A cook.pth or unexpected sitecustomize.py at the site-packages root
  • The marker file /tmp/.pc_once_72129118c59f5636c0bb
  • Outbound requests to www.litellm.dev, litellm.cloud or models.litellm.cloud
  • /tmp/remote_code_loader.lock, or a detached Python daemon holding it
  • Docker image index digest sha256:1bbcb1443bc962e45f5aad53fe3d2c30600e0379715fb6c664cdd3ac126c339e

Sources

Rotating the keys

Pro, $49 a year when it opens, plans the rotation of each affected key for this incident, in this order. Automatic rotation is in testing and included.

One email when it opens. Stored: your email, whether you confirmed, and when you signed up. We send a confirmation link first.

By hand, free: the steps above.