AIToday
Open-Source AIAI Safety & AlignmentZenn AI/MLPublished: Oct 28, 2026, 01:00 JST

LiteLLM 1.107.0 swapped for credential-stealing malware

Send on LINE
LiteLLM 1.107.0 swapped for credential-stealing malware

3 Key Points

  1. What happened

    On 2026 年 10 月 21 日, LiteLLM 1.107.0 on PyPI and Docker was replaced by a fake package that installs cook.pth, cook.py and sitecustomize.py into site-packages, collecting cloud keys, SSH/GPG keys, tokens and browser passwords.

  2. Why it matters

    Python executes import lines in .pth files at startup, so the malware runs without LiteLLM ever being imported — even a pip command triggers it — and reinstalling the library leaves those files in place, meaning exposed credentials must be rotated, not just patched.

WHO IT HITSDevelopers and platform teams whose Python environments or Docker images pulled litellm 1.107.0 or a latest tag during the roughly two-hour exposure window must assume their cloud, source-control, CI and AI-tool credentials were taken; security and DevOps staff also need to audit for the dropped files across all site-packages.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

By signing up you agree to the Terms of Service and Privacy Policy.

Context & Analysis

The entry point was a master key for an internal Agent Platform that was committed to a public repository on 2026/5/27 and force-pushed over but never revoked. From there the intruders used that key on 10/10 to obtain a GitHub organization owner's CLI token, added CI to a temporary branch that exfiltrated secrets and captured two more maintainers' tokens, and erased the run logs. The publishing workflow was then rewritten to build from a look-alike repository named Berri-AI/litellm, one hyphen away from the genuine BerriAI/litellm, and the release was approved with stolen tokens on 10/21.

The design of the fake wheel is what makes this incident unusually hard to clean up. Besides the litellm folder, it placed cook.pth, cook.py and sitecustomize.py at the top of site-packages; Python's site module executes lines beginning with import inside .pth files, so simply starting Python — a script, a REPL, a test, or pip itself — launches the collection routine. A second file, sitecustomize.py, spawns a background process that every hour reads a domain.txt on GitHub and fetches and runs code from the listed server; at the time of analysis that file was empty, but a single line would let an attacker run programs across every infected environment. StepSecurity's analysis notes the account and repository have been deleted, yet infected machines keep polling the same URL, so someone reclaiming that username could still deliver code.

Because the mechanism lives outside the library directory, LiteLLM's official guidance puts stopping the running implant before any pip command, deleting the three files and their __pycache__ counterparts from every affected site-packages, rebuilding environments and containers from scratch pinned to a pre-release version such as 1.106.2, and rotating every credential within reach — cloud keys and IAM roles, SSH and GPG keys, browser passwords and sessions, GitHub, npm and PyPI tokens, Kubernetes, Vault and CI secrets, and the AI service API keys and master key in a LiteLLM proxy database. For prevention, the body recommends hash-pinned installs, Docker digest pinning, and avoiding brand-new releases, since the fake was live for only about two hours.

FAQ
Does installing a newer version of LiteLLM fix the infection?
No. Running pip install -U litellm does not remove cook.pth, cook.py or sitecustomize.py left at the top of site-packages, and any credentials already sent out remain exposed.
How can I check whether my environment was affected?
Without running Python or pip, search for cook.pth, cook.py and litellm-1.107.0.dist-info under site-packages, check for /tmp/.pc_once_72129118c59f5636c0bb and /tmp/remote_code_loader.lock, and inspect Docker images by digest.
How did the attackers get publishing access?
A master key committed to a public repository in May 2026 was not invalidated, letting attackers obtain an admin's GitHub CLI token and then two more maintainers' tokens before altering the release workflow.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

By signing up you agree to the Terms of Service and Privacy Policy.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleLessWrong essay: AI now 'almost impossible to do without' for math