Skip to content
← All news
4 min read

LiteLLM 1.107.0 shipped a credential stealer through its own signed pipeline

An attacker holding three LiteLLM developers' GitHub CLI tokens pointed the private release workflow at an attacker-controlled repo, passed the approval gate with a second developer's credential, and let the official pipeline build, sign and publish the payload to PyPI, Docker Hub and GHCR.

The stealer sat in a file named cook.pth, so it ran on every Python start, pip included. PyPI pulled it by 13:23 UTC.

On October 21, 2026, LiteLLM disclosed that litellm==1.107.0 on PyPI, and the v1.107.0, latest, main-latest and main-stable tags on Docker Hub and GHCR, carried a credential stealer and a backdoor. The post's byline names four people, including CEO Krrish Dholakia, CTO Ishaan Jaffer and Director of Security Oliver Jensen. It credits Lidor Machluf with helping detect the incident.

LiteLLM puts many LLM providers behind one API, so a proxy install often holds every provider key a team has. Per LiteLLM, seven malicious wheels reached PyPI in 22 seconds starting at 11:39:51 UTC, and the release was live for about two hours, until 13:23 UTC. LiteLLM says all earlier versions are safe, advises pinning to 1.106.2, and says its private registry is not affected. LiteLLM has published no download or victim counts.

Three stolen tokens got past branch protection and the approval gate

LiteLLM says the attacker held GitHub CLI OAuth tokens belonging to three developers. One belonged to a GitHub organization owner and overrode branch protection on the private release workflow, which was then pointed at an attacker-controlled repository, Berri-AI/litellm. A second developer's credential passed the production approval gate, and the official pipeline built, signed and published the result. A third deleted the workflow records. Release permissions had also been widened temporarily the Monday before, so two internal engineers could publish bugfix backports, LiteLLM says.

LiteLLM 1.107.0, October 21, 2026 (UTC, per LiteLLM
unless marked SafeDep)

10:08   branch protection overridden on the release workflow
10:46   staging run starts from Berri-AI/litellm
11:11   second developer credential passes the approval gate
11:39   seven 1.107.0 wheels uploaded to PyPI
11:46   Docker images published with the payload
11:53   workflow records deleted
13:23   PyPI has removed 1.107.0
13:40   attacker's GitHub account returns 404 (SafeDep)
14:20   Docker Hub tags removed or repointed

LiteLLM believes the tokens came from logs of an internal LiteLLM deployment that was exposed to the internet. LiteLLM's post says that in some situations Claude Code can embed a user's GitHub CLI OAuth token in a response body, and that such tokens can end up in LiteLLM logs when response bodies are logged. How the attacker reached the deployment is unconfirmed. LiteLLM suspects a recently patched vulnerability.

A .pth file runs before any of your code does

SafeDep's analysis describes cook.pth as one line, import cook. Python runs .pth files at startup, so cook.py ran in every Python process on the host, whether or not it imported litellm. It took SSH keys, cloud and Kubernetes credentials, CI secrets, tokens for AI tools such as Claude, Cursor, Copilot, Codex and Gemini CLI, browser data, other processes' environment variables, provider keys from the LiteLLM proxy database, and instance metadata credentials. It encrypted the result with AES-256-CBC wrapped in RSA-OAEP and posted it to www.litellm[.]dev/healthcheck.

A second file, sitecustomize.py, started a detached daemon. Every hour, SafeDep says, it read a command-and-control domain from the GitHub user letters9813 and ran exec() on code fetched from that domain's /codepy path. Socket and Wiz corroborate the payload.

LiteLLM's cleanup order starts with not running pip

  • Do not run pip install first. Pip itself reruns cook.pth.
  • Delete cook.pth, cook.py, sitecustomize.py and their .pyc files.
  • Kill the daemon holding /tmp/remote_code_loader.lock.
  • Reinstall pinned to litellm==1.106.2, or rebuild the image or virtualenv from scratch.
  • If 1.107.0 ran with outbound internet, assume exfiltration and rotate the host's IAM role, every provider key in the proxy DB, master and virtual keys, the DATABASE_URL password, and any secret in any process's environment.
  • Check CloudTrail for GetCallerIdentity from the instance role around install time.

What is not confirmed

LiteLLM calls the investigation ongoing and is updating its post. There is no published count of downloads, affected hosts or stolen secrets. How the attacker first reached the exposed deployment is unknown. Railway disclosed on the same day that an attacker decrypted some customer environment variables, and none of the sources here link the two incidents.

Why a build studio cares

Our reading: apart from the release permissions widened the Monday before, each control in LiteLLM's pipeline did what it was built to do. Branch protection gave way only to an owner's credential, approval needed a second developer, and signing proved the official pipeline made the artifact. Each check confirmed a credential, and the attacker had the credentials. The leak path is the part we would audit first on any agent build: an agent tool's response body, logged in full, became a token store nobody had declared. So on any agent build, we would ask where full tool responses get logged, and who outside the team can read those logs.

Next step: run pip show litellm in every environment and check every image pulled from the v1.107.0, latest, main-latest or main-stable tags on October 21, then follow the rotation list in LiteLLM's incident post. If your agent stack logs tool responses and you are not sure what is in them, write to us at hello@gattyworks.com.

SecuritySupply ChainAI AgentsOpen SourceLiteLLMPyPIPythonDockerHubGitHubActionsSupplyChainAttackCredentialTheftDevSecOpsClaudeCodeCyberSecurity

Ready to know?

Send what you want checked or built. Fixed scope, price, and date in writing inside 24 hours, or the website or audit fee on your first project is refunded in full.

24 clock hours. Weekends included.
Book a call