LiteLLM version 1.107.0, published to PyPI, contains a hidden credential stealer and a backdoor, security firm SafeDep reported on October 21, 2026. LiteLLM is a widely used Python library that lets apps talk to many AI model providers through one interface, so the machines it runs on often hold API keys for OpenAI, Anthropic and others. The malicious files run every time Python starts on the infected machine, even if your code never imports LiteLLM. Versions 1.106.2, 1.107.0rc1 and 1.107.0rc2 are clean.
How did malware get into an official release?
Through the build, not the source code. The code on LiteLLM’s public GitHub repository is clean. But the package uploaded to PyPI had one extra line in its build settings that copied a hidden folder of malicious files into every installer, on Linux, macOS and Windows. SafeDep concluded that someone tampered with the build outside the public repository, either through a compromised release pipeline or stolen PyPI credentials.
That is what makes this kind of attack hard to spot. Reviewing the code on GitHub would show nothing wrong. Only inspecting the actual package you downloaded reveals it.
What does the malware steal?
Almost everything worth stealing from a developer machine or server. The stealer collects SSH keys, AWS, Azure and Google Cloud credentials, Kubernetes and Docker configs, saved browser passwords, shell history, CI/CD secrets and private keys. It specifically targets AI developer tools, including credentials and configs for Claude Code, Claude Desktop, Cursor, Copilot, Codex, Gemini CLI, Windsurf and MCP configuration files. If it finds a LiteLLM proxy database, it dumps the stored AI provider API keys.
It encrypts the haul and sends it to a lookalike domain, www.litellm[.]dev. A second file installs a background process that, every hour, checks a GitHub file for a server address, steals credentials again and downloads and runs whatever code that server sends. In plain terms: once installed, the attacker can run anything they like on the machine, indefinitely.
What should you do if you use LiteLLM?
- Check your version: run
pip show litellm. If it says 1.107.0, treat the machine as compromised. - Pin to a clean version such as 1.106.2 and reinstall.
- Look for the implant files
cook.pth,cook.pyandsitecustomize.pyin your Python site-packages folder, and the marker files/tmp/.pc_once_72129118c59f5636c0bband/tmp/remote_code_loader.lock. - Kill any detached Python background process you did not start.
- Rotate everything: cloud keys, SSH keys, AI provider API keys, GitHub tokens, and any passwords saved in browsers on that machine. Uninstalling the package does not undo theft that already happened.
- Check CI pipelines, since the stealer runs inside build jobs too.
Why is this part of a bigger pattern?
AI tooling has become the most valuable target in the software supply chain, because the machines running it hold the most powerful keys. The same day, hosting platform Railway disclosed a breach it linked to a wave of attacks on platforms that host AI inference. It follows slopsquatting fake packages, GitSpawn and AgentCorruption. The lesson is the same each time: pin your dependency versions, verify what you install, and keep AI credentials scoped so one stolen key cannot unlock everything.
Read SafeDep’s full analysis, including file hashes.
Part of our coverage of Black October 2026, every major AI security incident this month.



