LiteLLM 1.107.0 on PyPI Carried a Credential Stealer: How the Release Pipeline Was Hijacked With Three Developers' Tokens

By Carlos Montiel | Enterprise AI Specialist
Leer en español →
Published: 2026-10-25 | By: Carlos Montiel | Reading time: ~5 minutes
LiteLLM 1.107.0 on PyPI Carried a Credential Stealer: How the Release Pipeline Was Hijacked With Three Developers' Tokens

LiteLLM is the gateway many companies put in front of their models to centralize OpenAI, Anthropic or AWS Bedrock keys. On October 21, someone used its maintainers' own credentials to publish a 1.107.0 with a credential stealer and a backdoor. The instructive part isn't the malware: it's how they got around the release controls.

What Happened, According to LiteLLM's Official Report

LiteLLM published an incident report dated October 21, 2026: the release pipeline was compromised and a malicious litellm==1.107.0 reached PyPI and container registries. The report itself warns that some initial assumptions turned out to be inaccurate or incomplete, so it's best read as an evolving report. Socket, Datadog Security Labs, StepSecurity, OX Security and Mend published analyses of the same incident.

Time (UTC, Oct 21) Event 10:08 A privileged developer credential overrides branch protection 10:46 A workflow runs from Berri-AI/litellm (one hyphen away from BerriAI/litellm) 11:11 A second credential satisfies the production approval 11:39 Seven malicious 1.107.0 wheels are uploaded to PyPI 11:46 Malicious Docker images are published 11:53 A third credential deletes the run logs 13:23 PyPI removes 1.107.0 14:20 Docker Hub removes or repoints the affected tags

Exposure windows: PyPI, 11:39 to 13:23 UTC; Docker Hub (v1.107.0, latest, main-latest, main-stable), 11:46 to 14:20 UTC. The v1.107.0 code tag in the official repository doesn't contain the malicious files, and according to the report, customers with an enterprise private registry weren't affected.

How the Attack Works: The Pipeline as the Target

The attacker didn't breach PyPI: they used three sets of developers' GitHub CLI OAuth tokens. With one, which had organization-owner permissions, they disabled branch protection and modified the release workflow; with another they met the approval that production required; with the third they erased the trail. Datadog adds that the fork used, Berri-AI/litellm, resembles the legitimate one except for a single hyphen. LiteLLM says release permissions had been temporarily widened that week, which made it easier for two stolen credentials to suffice.

Root cause: not yet confirmed. LiteLLM suggests the tokens may have been embedded in response bodies by Claude Code and written to logs on an internal, internet-exposed instance; it also found an unexpected user account on that deployment and suspects a recently patched vulnerability. Other outlets reported a "master key" leaked in a public repository; the official report doesn't name it as the root cause, only lists it among the secrets to rotate. Treat both versions as hypotheses.

What the Package Did

According to Mend, the seven built wheels came with three extra files. One is a .pth hook that runs every time Python starts, even if you never import LiteLLM; another is a loader that downloads and executes remote code every hour (a RAT-style backdoor, in OX Security's words). The official report names the files cook.pth, cook.py and sitecustomize.py. A Python daemon stays in the background with a lockfile at /tmp/remote_code_loader.lock. Removing just the LiteLLM folder isn't enough: the startup components live outside it.

What to Do If You Installed 1.107.0

What It Means for a Company Using AI Gateways

Takeaway for your company: an LLM gateway concentrates the keys of all your providers, so compromising it is equivalent to compromising all of them. Three concrete controls: (1) pin versions with hashes and don't auto-update critical infrastructure dependencies on release day; (2) in your own pipelines, don't relax release approvals "temporarily," and use short-lived, minimally scoped tokens, never organization-owner ones; (3) keep a list of which AI keys live in each gateway so you can rotate them in hours, not days.
Carlos Montiel
Enterprise AI Solutions Architect
Specialist in LLMs, Agents, and Orchestration
guatemalia.com/#contacto · info@guatemalia.com

Need to implement AI in your company?

Carlos Montiel is an enterprise AI solutions architect. He implements LLMs, Agents, RAG, and orchestrators for companies across Guatemala and Latin America. Reach out for a consultation.

Contact Carlos Montiel

info@guatemalia.com