AIToday
AI Safety & AlignmentOpen-Source AIGIGAZINE AIPublished: Oct 22, 2026, 16:00 JST

LiteLLM 1.107.0 on PyPI hid a credential stealer and backdoor

Send on LINE
LiteLLM 1.107.0 on PyPI hid a credential stealer and backdoor

3 Key Points

  1. What happened

    SafeDep found malicious files in all seven packages of LiteLLM 1.107.0, published on PyPI on October 21, 2026 and pulled about two hours later, while the GitHub source stayed clean.

  2. Why it matters

    The tampered package does not match the clean code developers can inspect on GitHub, so anyone who installed it should treat the environment as potentially exposed and rebuild it.

WHO IT HITSDevelopers and IT teams that pulled LiteLLM from PyPI, and anyone sharing those Python environments, may need to rotate credentials; the team also warns against starting with a normal update, because it can re-trigger the malicious files before they are removed.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

The incident stands out because the malicious code did not need LiteLLM to be running. By abusing the .pth mechanism that Python uses to load settings at startup, the attackers arranged for cook.py to execute whenever Python launched in the same environment. That widened the exposure well beyond the tool itself, and it is why the development team says affected users should not begin with a normal update: starting Python first would re-run the malicious files before they are deleted.

SafeDep's comparison of the distributed packages with the official GitHub repository found that the source code was clean, so the tampering happened somewhere between the repository and the published package. The stolen data was encrypted with a key held by the attacker and sent to an external server, making it hard to inspect what was taken. The backdoor's design, which fetched its server address from a GitHub file that the attacker could rewrite, also meant the payload could be swapped after installation.

The team has contained the damage but says it is still investigating how the attackers got in. Until that route is known, the practical advice is to treat any environment that installed 1.107.0 as potentially exposed, remove the files, rebuild the environment, and change passwords and API keys.

FAQ
Which files made up the malicious program?
Three files: cook.pth, cook.py and sitecustomize.py. The .pth file caused cook.py to run automatically when Python started, and sitecustomize.py carried the backdoor.
What data was the stealer after?
Saved browser passwords and history, SSH private keys, cloud credentials, login tokens for AI coding tools such as Claude Code, Cursor and GitHub Copilot, and the AI service API keys managed by LiteLLM.
How did the backdoor reach the attacker?
It checked a GitHub file every hour to get a server address, then re-ran the stealer and downloaded other programs. The attacker could change the address just by editing that GitHub file.
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.

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 articleAutonomous researchers could overwhelm peer review, essay warns