Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

IncidentSupply chain

LiteLLM 1.107.0: stolen GitHub tokens pushed a credential-stealing release to PyPI and Docker

CriticalLiteLLM (BerriAI)WizSocketAikido

LiteLLM reported that on October 21, 2026 its release pipeline published litellm 1.107.0 with compiled malware that steals credentials and loads remote-code execution tools. Using three engineers' GitHub accounts, through stolen GitHub CLI OAuth tokens, the attacker overrode branch protection at 10:08 UTC and changed the workflow to build from an attacker-controlled repository, Berri-AI/litellm; a second account approved the production release at 11:11 and a third deleted the production and staging workflow records at 11:53. Seven wheels were on PyPI from 11:39 to 13:23 UTC, and the Docker Hub tags v1.107.0, latest, main-latest and main-stable served the image from 11:46 to 14:20 UTC, with the GHCR images unavailable by 13:51. The official v1.107.0 source tag does not contain the malicious files, and enterprise customers on LiteLLM's private registry were not affected. The malware drops cook.pth and sitecustomize.py into site-packages, so it runs whenever Python starts in that environment. Socket lists cloud, Kubernetes and Docker credentials, Git, SSH and GPG keys, browser logins, cookies and shell history, the authentication files of Codex, Claude, Gemini and Cursor, and attempts on LiteLLM proxy databases, sent encrypted to an address on litellm[.]dev. Help Net Security reports LiteLLM found an unexpected account in an internal deployment exposed to the internet and believes the attacker took tokens from its logs, noting that Claude Code can include a user's GitHub CLI token in response bodies. Wiz saw stolen AWS credentials from CI runners and Kubernetes nodes validated about four and a half hours after exfiltration, with Bedrock model listings it calls consistent with LLMjacking and, in a few environments, IAM enumeration. It is LiteLLM's second supply chain attack of 2026, after one in March. LiteLLM's October 23 postmortem, summarized by The Register, traced the chain to a master key for an open source tool it used internally to orchestrate AI agents, committed on May 27 to the public LiteLLM-Labs/lite-harness repository; the commit was removed quickly but the key was not revoked. On October 10 the attacker used it to reach the LiteLLM Agent Platform and extract a GitHub CLI OAuth token with owner-level access to every repository in LiteLLM's GitHub organization, then committed workflows to other internal repositories to steal CI tokens and secrets, took the GitHub CLI OAuth tokens of two engineers with maintainer privileges and tokens for other internal systems, with a focus on upstream inference API tokens. Wiz counts about 49,000 downloads of the package in the under two hours it was on PyPI. LiteLLM is revoking every token tied to every internal system and vendor platform.

Replay the attack step by step in the Learning Center

How it happened

  1. A master key committed to a public repository on May 27 and never revoked gave the attacker LiteLLM's internal agent platform on October 10, and a GitHub CLI OAuth token with it.
  2. Stolen GitHub CLI OAuth tokens for three engineers let the attacker override branch protection, approve the release and delete the workflow logs.
  3. The release workflow built from a lookalike repository, Berri-AI/litellm, one hyphen from the real BerriAI/litellm.
  4. Startup files in site-packages ran the stealer on every Python start, even when LiteLLM was never imported.

Impact

Anyone who installed 1.107.0 or started the affected images during the windows should assume their cloud, developer and AI provider credentials were taken; Wiz saw stolen AWS credentials used within hours.

The fix

Pin litellm to 1.106.2 or another release from before the incident, and do not run pip install first in an affected environment. Remove cook.pth, cook.py and sitecustomize.py, stop the daemon holding /tmp/remote_code_loader.lock, rebuild images and environments from scratch, and rotate the instance role, every provider key in the proxy database, master and virtual keys, the database password and every secret in the host's environment. LiteLLM removed the affected users from its GitHub organization and is rotating its own tokens.

Lessons

  • A release approval is only as strong as the tokens of the people who give it; three stolen tokens passed two gates and erased the trail.
  • Floating tags such as latest turn one bad release into an automatic install everywhere.
  • Tokens in logs are tokens for anyone who reads the logs.
  • Removing a commit does not unpublish a secret; a key that was public for minutes in May opened the door in October.

Sources