Home / Tools / LiteLLM / 1.107.0 compromise

LiteLLM 1.107.0 malware: what happened and what to do

On Oct 21, 2026, attackers used LiteLLM's own release pipeline to publish litellm 1.107.0, a version carrying credential-stealing malware, to PyPI (about 7:39 to 9:23 AM ET) and to the Docker Hub and GHCR tags v1.107.0, latest, main-latest and main-stable (until about 10:20 AM ET). You're affected if you installed 1.107.0 or started one of those images in that window; LiteLLM says all earlier versions are safe. Pin litellm==1.106.2, and if you were affected, remove the malware files without starting Python, rebuild the environment, and rotate every credential that machine could reach.

Published · Last updated · Every fact below is from the sources, linked inline. LiteLLM's canonical record of how it happened is its Oct 23 attack-chain post.

Am I affected?

LiteLLM says you are affected if you installed an unpinned LiteLLM with pip between 11:39 and 13:23 UTC on Oct 21 (7:39 to 9:23 AM ET), or used the Docker image tags v1.107.0, latest, main-latest or main-stable between 11:46 and 14:20 UTC (7:46 to 10:20 AM ET). If you ran pip install on 1.107.0 or started one of those images in that window, LiteLLM says to assume the environment is compromised. [1]

Check a Python environment

The malware runs every time Python starts in an infected environment, even if litellm is never imported, and that includes running pip [3][1]. So start with checks that don't launch Python. LiteLLM says to search for litellm-1.107.0.dist-info, cook.pth and sitecustomize.py: finding one confirms exposure, but not finding one does not prove the environment is clean. [1]

find / -path '*site-packages*' \( -name 'litellm-1.107.0.dist-info' -o -name 'cook.pth' -o -name 'cook.py' -o -name 'sitecustomize.py' \) 2>/dev/null
ls -la /tmp/.pc_once_72129118c59f5636c0bb /tmp/remote_code_loader.lock 2>/dev/null

The second line looks for the run-once marker the stealer writes after a successful upload and the lock file held by its background loader [2]. If the marker exists, the theft is confirmed; if it doesn't, that proves nothing, because containers and tmp cleanup remove it [1]. Some systems ship their own sitecustomize.py, so cook.pth or the 1.107.0 dist-info is the clearer signal.

Check requirements files and lockfiles (and CI logs) for anything that resolved to 1.107.0 on Oct 21. In uv.lock and poetry.lock the version sits on the line after the package name:

grep -rn 'litellm==1\.107\.0' --include='requirements*.txt' . 2>/dev/null
grep -n -A1 '^name = "litellm"$' uv.lock poetry.lock 2>/dev/null

LiteLLM also suggests pip show litellm to see the installed version [1]. Run it only where you don't expect 1.107.0, since pip itself starts Python:

pip show litellm

Check Docker

LiteLLM says any container that ran the image index sha256:1bbcb1443bc962e45f5aad53fe3d2c30600e0379715fb6c664cdd3ac126c339e should be treated as compromised [1]. The GHCR litellm-database and litellm-non_root variants used indexes starting sha256:c00f9d92c427 and sha256:7b00e91cd2fe [1]. The per-platform manifests were bd1aeee4… (amd64) and 56b74573… (arm64) [4]. List local images with their digests and any containers built from them:

docker images --digests | grep -i litellm
docker ps -a --no-trunc | grep -i litellm

If a compose file or Dockerfile uses latest, main-latest or main-stable and the image was pulled and started between 7:46 and 10:20 AM ET on Oct 21, treat it as affected [1]. Full wheel and image hashes are in the Wiz IOC tables [4].

What to do

Not affected: pin litellm==1.106.2 or another explicit version published before the incident, [1]. For Docker, the researchers who reported the incident advise pinning v1.106.2 by digest, not by tag [2].

Affected: LiteLLM's steps (which it credits to LidorMachluf, who helped detect the incident), closely paraphrased [1]:

  1. Don't start with pip install. Any Python start in the affected environment, pip included, runs cook.pth and sitecustomize.py again.
  2. From the shell, delete cook.pth, cook.py, sitecustomize.py and any matching __pycache__/cook*.pyc and sitecustomize*.pyc from every affected site-packages.
  3. Kill the detached Python daemon (it holds /tmp/remote_code_loader.lock).
  4. Reinstall pinned to litellm==1.106.2. Rebuilding images and virtualenvs from scratch is better.
  5. If 1.107.0 was ever installed on a host with outbound internet, assume the data was stolen.
  6. Rotate everything the host could reach, in particular: the instance or task IAM role; every provider key stored in the LiteLLM proxy database, plus the master and virtual keys; the DATABASE_URL password; and any secret in the environment of any process on the host.
  7. Check CloudTrail for GetCallerIdentity calls from the instance role around install time, then for use of the role's credentials from outside your infrastructure.

Datadog adds: rotate credentials from a clean machine, and audit logs for use of exposed credentials during the exposure window. Deleting the litellm package directory alone does not remove the malware files. [5]

This is not hypothetical: Wiz reports that, starting about 4.5 hours after the theft (12:20 to 1:01 PM ET on Oct 21), the attacker checked stolen AWS instance-role credentials from CI runners and Kubernetes nodes with sts:GetCallerIdentity, then bedrock:ListFoundationModels, consistent with LLMjacking, and in a few environments enumerated IAM users, roles and keys. [4]

What the malware does

Wiz counts about 49,000 downloads of the malicious version, from ClickPy data. [4]

How it happened

LiteLLM published the full attack chain on Oct 23, and it replaces the cause it first suspected. On May 27, 2026, a config file (opencode.json) committed to the public LiteLLM-Labs/lite-harness repository contained the master key for LiteLLM's internal deployment of its experimental Agent Platform. The commit was force-pushed over and the key flagged for revocation, but it was never revoked. On Oct 10 the attacker used that key to call the Agent Platform API, which returned the GitHub CLI OAuth token of a GitHub organization owner (the platform used it to open pull requests; it was not a scoped service account). With that token the attacker ran throwaway workflows that posted repository secrets, including two more maintainers' GitHub CLI tokens, to an attacker endpoint. On Oct 21 they used the three tokens to override branch protection, point LiteLLM's private release workflow at a lookalike repository (Berri-AI/litellm instead of BerriAI/litellm), approve the production gate, and delete the run records. The official v1.107.0 source tag on GitHub does not contain the malicious files. [6][1]

LiteLLM's first post suspected the tokens came from the logs of its internet-exposed internal LiteLLM gateway; its Oct 23 post says the request logs show the first token came from the Agent Platform instead. The first post also said LiteLLM had observed specific situations in which Claude Code embeds a user's GitHub CLI OAuth token in a response body, so a gateway that logs response bodies can end up storing it. That observation was not part of the confirmed attack path, but the advice below still applies. We found no Anthropic statement on it as of Oct 28. [6][1]

If you run Claude Code through a gateway

Treat gateway and proxy logs that capture response bodies as secrets: keep the gateway off the public internet, restrict or turn off response-body logging, and revoke any GitHub CLI token that could be in those logs (gh auth logout revokes nothing server-side, so revoke it from GitHub's authorized OAuth apps page). Claude Code's own raw API body logging (OTEL_LOG_RAW_API_BODIES) is off by default per its monitoring docs. See also our Claude Code security note. [1]

Timeline (Oct 21, 2026, Eastern Time)

Time (ET)Event
4:56–6:46 AMAttacker pushes 10 commits adding the payload to the lookalike repo Berri-AI/litellm. [4][2]
6:08 AMBranch protection rejects a change to LiteLLM's private release workflow; seconds later a privileged developer credential overrides it. [1]
6:46 AMThe modified workflow starts an official staging run from the attacker's repository. [1]
7:11 AMA second developer's credential satisfies the production approval gate. [1]
7:39–7:40 AMSeven malicious litellm==1.107.0 wheels uploaded to PyPI. [1]
7:46 AMMalicious Docker images published; v1.107.0, latest, main-latest and main-stable point at them on Docker Hub and GHCR. [1]
7:53 AMA third developer's credential is used to delete the workflow run records. [1]
8:06 AMSecurity researchers report the malicious wheels in LiteLLM GitHub issue #47826. [2]
9:20–9:23 AMPyPI quarantines and removes 1.107.0 (Wiz and Datadog say 9:20; LiteLLM says removed by 9:23). [4][5][1]
9:51 AMAffected GHCR tags found unavailable; Docker Hub tags still resolve to the malicious image. [1]
10:20 AMAll affected Docker Hub tags and image variants removed or repointed to verified clean images. [1]
12:20–1:01 PMWiz observes the attacker testing stolen AWS credentials. [4]
2:30 PMLiteLLM posts its public incident write-up. [2]
4:30 PMLiteLLM says it has identified the attack chain and updates the post. [1]
10:19 PMLiteLLM: investigation ongoing, registries locked to new releases, regular releases paused; updates move from every two hours to when there's news. [2]

Sources give times in UTC; converted to ET (UTC−4). Wiz and Datadog put Docker removal at about 9:53 AM ET; we use LiteLLM's own time for Docker Hub (10:20 AM).

FAQ

Is LiteLLM safe to use now?

LiteLLM says all versions published before 1.107.0 are safe and recommends pinning 1.106.2 or another explicit earlier version. The malicious files were not in the official v1.107.0 source tag; the bad artifacts were built from a lookalike repository (Berri-AI/litellm). As of LiteLLM's Oct 21, 10:19 PM ET update, its registries were locked to new releases and regular releases were paused while the investigation continues. This is LiteLLM's second supply-chain compromise of 2026: versions 1.82.7 and 1.82.8 were hit in March.

Is litellm 1.106.2 affected?

No. OSV lists 1.106.2 and the 1.107.0rc1 and rc2 release candidates as not affected, and LiteLLM recommends pinning 1.106.2.

Does the malware run if I never import litellm?

Yes. Per OSV, the wheel installs cook.pth, cook.py and sitecustomize.py at the root of site-packages, so the payload runs at every Python interpreter start in that environment, even without importing litellm. That includes running pip.

What did the LiteLLM 1.107.0 malware steal?

Per OSV, Wiz and Datadog: browser passwords, cookies and history; SSH, GPG and TLS private keys; shell history; AWS, GCP and Azure credentials, including cloud instance metadata; Kubernetes, Docker, Vault and CI secrets; git, npm and PyPI tokens and .env files; LLM provider API keys and AI coding tool configs (Cursor, Claude, Kiro, Windsurf and others); environment variables; and, if DATABASE_URL is set, the upstream provider keys stored in the LiteLLM proxy database. Data was encrypted and sent to www.litellm.dev/healthcheck, a lookalike domain not owned by LiteLLM.

Should I still pin litellm 1.106.2?

For the 1.107.0 malware, yes: 1.106.2 is clean. But on Oct 27 LiteLLM published a separate critical advisory (GHSA-w4c7-34wj-hqm8, CVSS 10.0) for proxies running with an Enterprise license: an unauthenticated request could leak the master key and provider API keys. If you run a licensed proxy, move to 1.106.5 (or 1.105.6, 1.104.8 or 1.103.10 on older lines) and rotate the master key. Open-source deployments without a license are not affected by that advisory.

How did the attacker get in?

Per LiteLLM's Oct 23 attack-chain post: a master key for its internal Agent Platform leaked in a public repo on May 27 and was never revoked. On Oct 10 the attacker used it to pull a GitHub organization owner's GitHub CLI token from the Agent Platform API, used that to steal two more maintainers' tokens through CI workflows, and on Oct 21 used all three to publish the poisoned release from a lookalike repository.

Were LiteLLM Enterprise customers affected?

LiteLLM says enterprise customers pulling from its private enterprise registry were not affected.

If you're evaluating LLM gateways

For the job “one API for many models”, our current pick is OpenRouter (90.7/100): A hosted API that gives one key access to many models, with free models available. The runner-up is LiteLLM (79.7/100): Open-source proxy and SDK you run yourself in front of any provider.

Our scores come from a published formula that doesn't factor in security incidents, so this incident didn't change either score. Whichever gateway you use, pin exact versions and image digests rather than floating tags. Full comparison: best LLM gateway.

Sources

  1. LiteLLM: “Contained: Oct 21, 2026 LiteLLM release v1.107.0 Compromised” (official incident post; an Oct 23, 21:50 UTC note says some of its early assumptions were inaccurate and points to the attack-chain post [6])
  2. BerriAI/litellm issue #47826 (original report by the Upwind security research team, plus LiteLLM's status updates)
  3. OSV: MAL-2026-2144, malicious code in litellm (PyPI)
  4. Wiz: “LiteLLM Compromised, Steals Credentials” (includes IOCs and post-exploitation activity)
  5. Datadog Security Labs: “LiteLLM supply chain compromise: What you need to know”
  6. LiteLLM: “The attack chain behind the v1.107.0 LiteLLM release” (published Oct 23, 2026; LiteLLM calls it the canonical record)
  7. GHSA-w4c7-34wj-hqm8: Unauthenticated file read leaks master key on Enterprise proxy (separate vulnerability, published Oct 27, 2026)

Sources checked Oct 22, 2026, about 9:45 AM ET; attack chain and the Oct 27 Enterprise advisory added Oct 28, about 9:20 AM ET. We'll update this page if LiteLLM changes its guidance. Spotted an error? Tell us.

The weekly pick sheet

Once a week: what shipped, which picks changed, and why. Free.

  • Pick changes, with the scores behind them
  • The week's notable releases, each linked to its source
  • No paid placement. Unsubscribe in one click.