Loot box
LiteLLM 1.107.0 shipped a credential stealer for under two hours. Unpinned installs and the latest tag took it. The unattended box is the loot. Pin by hash.
Loot box
Picture a scheduled job. Every afternoon it rebuilds its environment, runs pip install litellm, starts, does its work and stops. Nobody watches. It has a cloud role, a database password and a few model provider keys in its environment, because that is where unattended jobs keep them.
On 21 October, between 13:39 and 15:23 CEST, that rebuild would have installed LiteLLM 1.107.0. The job would have worked. The keys would have left.
That box is the object of this note. Not the developer laptop — the machine that runs on its own and holds the keys.
What shipped on 21 October
LiteLLM is a widely used Python library and proxy for calling model providers. On 21 October its release pipeline published 1.107.0 with malware inside. LiteLLM’s own incident post gives the windows in UTC. Converted to CEST:
- PyPI, all seven wheels: live from 13:39 to 15:23.
- Docker Hub, the tags
v1.107.0,latest,main-latestandmain-stable: pointed at the compromised image from 13:46 to 16:20. - GitHub Container Registry, the same tags: unavailable by 15:51.
The safe version shipped the same day. PyPI lists the 1.106.2 wheels as uploaded at 12:44 CEST, less than an hour before the bad ones.
LiteLLM is direct about who is affected. “You are affected if you used an unpinned version of LiteLLM between 11:39 and 13:23 UTC via pip”, or ran one of those Docker tags inside its window.
It is the second time this year. In March, versions 1.82.7 and 1.82.8 carried a credential harvester (GHSA-5mg7-485q-xm76). JFrog says no evidence links the two and treats them as separate campaigns.
A clean tag, a poisoned wheel
The source was fine. In LiteLLM’s words, “The official v1.107.0 source tag in GitHub does not contain the malicious files.” The wheels were built from a lookalike repository, Berri-AI/litellm instead of BerriAI/litellm.
JFrog’s analysis found three extra files in every wheel, cook.pth, cook.py and sitecustomize.py. Python runs .pth files at startup. “The payload can run even when an application never imports litellm.” The second hook forks a detached loader that checks a dead drop every hour and runs whatever Python it is handed.
Everything else in the wheel was, in JFrog’s words, “a functional copy of the legitimate project”. Tests pass. The job works. That is what makes it a good disguise.
JFrog draws the review lesson itself. “Reviewers who inspect only source code, a Git tag, or an sdist can therefore miss malicious behavior delivered in a platform-specific binary artifact.”
What the stealer wanted
JFrog lists the targets. Cloud credentials for AWS, Azure and Google Cloud, plus instance metadata. Kubernetes, Docker, Vault and CI secrets. Package and source-control tokens. AI development configs for Cursor, Claude, Codex, Gemini, GitHub Copilot, Windsurf and eleven more. The environment of the current process and of every readable /proc/<pid>/environ on Linux. And on a LiteLLM proxy, the table where it stores provider keys.
Read that list again as a description of a headless box. A headless agent is a job, a machine and a schedule. Its keys live next to it, because nobody is there to type them. Identity is the gate ended on a bot without a service identity being a leaked PAT with a cron. This is the leak, seen from the attacker’s side.
The box also re-arms itself. LiteLLM warns that “Any Python start in the affected environment runs cook.pth and sitecustomize.py again, and that includes running pip.” A machine that starts Python every few minutes does the attacker’s scheduling for free. And the advice is blunt. “If 1.107.0 was ever installed on a host with outbound internet, assume the exfil succeeded.”
Even the way in was an unattended box. LiteLLM believes the attacker reached an internal LiteLLM deployment exposed to the internet and took GitHub CLI tokens from its logs. It says it has “observed specific situations in which Claude Code will embed a user’s GitHub CLI OAuth token into a response body”. Three developers’ tokens, one of them an organisation owner’s, were enough to switch off branch protection and repoint the release workflow. LiteLLM marks parts of this as not yet confirmed.
Pin by hash, not by name
Every reference in a build is either a name or a fact. On 21 October the names moved.
| What the job asked for | What it got on 21 Oct | The reference that holds |
|---|---|---|
litellm, unpinned | 1.107.0 wheels, 13:39 to 15:23 CEST | ==1.106.2 plus --hash |
Docker latest, main-latest, main-stable | the compromised image, 13:46 to 16:20 CEST on Docker Hub | the image digest, @sha256: |
| The v1.107.0 Git tag | clean source | nothing, the wheel was built elsewhere |

To be fair to names, litellm==1.106.2 alone would have kept a PyPI install out of this one. A hash adds two things a version number cannot. It records the bytes you approved, not a label the publisher controls. And it turns every upgrade into a diff someone has to accept. pip’s own docs are plain about the default. “By default, pip does not perform any checks to protect against remote tampering”. Hash-checking mode, --require-hashes, is the opt-in.
Docker is where the name fails outright. LiteLLM says that after March it made its Docker release tags immutable. The latest and main-stable tags are pointers by design, and on 21 October they pointed at the stealer. A digest is the only image reference nobody can move.
The human belongs at the bump
A hash lock has one weak moment, the upgrade. If a bot opens the bump inside the window and merges it, the lock faithfully pins the stealer.
So the human in the loop for a headless job is not someone watching it run. It is someone who accepts each new hash, after a waiting period, before any unattended box can pull it. This release was off PyPI in under two hours. A waiting period measured in days would not have been tested by this incident at all.
That makes two SLAs worth writing down. How long does a new version wait before a scheduled job may use it, and who signs it in? And how fast can you rotate everything the box could reach? LiteLLM’s list is the instance or task role, every provider key in the proxy database plus master and virtual keys, the DATABASE_URL password, and “any secret that was in the environment of any process on the host”. If that takes longer than an afternoon, the box holds more than you can afford to lose.
Steal this
- Lock Python dependencies with hashes and install with
--require-hasheson every unattended box. - Reference container images by digest in anything that runs on a schedule. Never
latest, nevermain-stable. - Put a person on dependency bumps for headless jobs, with a waiting period before a new release reaches them. Auto-merge is how a hash lock pins the malware.
- Give scheduled jobs short-lived credentials and only the ones they need. The stealer read every environment it could reach.
- If 1.107.0 ran anywhere, follow LiteLLM’s order. Do not start with pip. Delete
cook.pth,cook.pyandsitecustomize.pyfrom the shell, kill the loader, rebuild pinned to 1.106.2, and rotate everything the host could reach.
LiteLLM’s status still reads “Incident contained, investigation in progress”, and an embargoed LiteLLM vulnerability is due to be disclosed on 27 October. Some details may move. The windows and the target list above are what this note relies on.
Field note from the build-in-public log. NDA-safe, no client names, rounded figures only. If this matches what you are seeing, get in touch.
§
BELOW THE LINE
PODČÁRNÍK · SIDEWAYS GLANCE, NOT A SUMMARY
On the porter who gave the keys to anyone in the right overall
In the office before email, the porter kept a board of keys behind his window and a book that everyone signed. He trusted nothing he could not read.
At six every evening the cleaner came. Blue overall, a bucket, the word Cleaning stitched across the back. The porter read the word, passed out the ring and went back to his tea.
The ring grew over the years. Every new lock in the building added a key, because the cleaner had to get in everywhere. The archive, the canteen, the director’s office, the room with the safe, the garage. In the end the ring, heavy as a brick, no longer fit even through the porter’s generous window. He had to open the door for it, every time with the same annoyed face, because it meant getting up from his comfy armchair in front of the TV, right in the middle of a nail-biting Jeopardy!
The cleaner signed the book every night. The same small loop, the same lean to the right, for nine years.
One evening a different man came. Same overall, same bucket, the same word on his back. He signed in a big round hand that leaned the other way. The porter read Cleaning, passed out the ring and poured himself more tea.
In the morning the floors shone. The bins were empty, the ashtrays washed, the plants watered. Even the safe had been cleaned out.
When the police asked, the porter showed them the book. It said Cleaning, he said. And in fairness, the man had cleaned.
Today the porter is one line in a requirements file. It asks for a name, takes whatever turns up in the right overall, and the new arrival works perfectly well. The handwriting is right there in the book. It is called a hash, and nobody compares it.
ČESKY. ORIGINÁL PODČÁRNÍKU
O vrátném, který dal klíče každému ve správných montérkách
V podniku před mailama měl vrátný za okýnkem tabuli s klíči a knihu, do které se každý podepisoval. Nevěřil ničemu, co si nemohl přečíst.
Každý večer v šest přišel uklízeč. Modré montérky, kýbl a na zádech vyšité ÚKLID. Vrátný si přečetl nápis, podal svazek a vrátil se k čaji.
Svazek s léty rostl. Každý nový zámek v budově přidal klíč, protože uklízeč musel všude. Archiv, kantýna, ředitelna, místnost s trezorem, garáž. Nakonec svazek, těžký jako cihla, už neprošel ani nemalým okýnkem vrátnice. Vrátný mu musel otevřít dveře, pokaždé s naštvaným výrazem, že se musí zvednout z pohodlného křesla od bedny, kde zrovna jelo napínavé Riskuj!
Do knihy se uklízeč podepisoval každý večer. Stejná malá klička, stejný sklon doprava, devět let.
Jednou večer přišel jiný chlap. Stejné montérky, stejný kýbl, na zádech stejné ÚKLID. Podepsal se velkým kulatým písmem, které padalo na druhou stranu. Vrátný si přečetl ÚKLID, podal svazek a dolil si čaj.
Ráno se podlahy leskly. Koše vysypané, popelníky umyté, kytky zalité. Trezor taky vybílený.
Když se policie ptala, ukázal vrátný knihu. Stálo tam přece Úklid. A nutno uznat, že ten chlap opravdu uklidil.
Dnes je vrátný jeden řádek v requirements souboru. Řekne si o jméno, vezme, co přijde ve správných montérkách, a nový balík funguje úplně normálně. Písmo je přitom v knize. Říká se mu hash a nikdo ho neporovnává.