NewsAI & DevelopmentSecurity

LiteLLM Shipped Malware on October 21 — 49K Downloads Before Anyone Noticed

Python snake wrapped around a compromised package with red warning icons — LiteLLM supply chain attack illustration
LiteLLM 1.107.0 shipped a credential stealer on October 21, 2026

On October 21, 2026, someone with maintainer access to LiteLLM pushed a poisoned release — version 1.107.0 — to PyPI and Docker Hub. The package contained a professional-grade credential stealer and an hourly remote code execution loader. It was live on PyPI for one hour and forty-four minutes. In that window, 49,000 developers downloaded it. If you run any Python environment with LiteLLM installed, treat it as compromised until proven otherwise.

LiteLLM is the open-source AI gateway most teams use to route requests across providers — OpenAI, Anthropic, Gemini, and dozens of others. It sees 23 million downloads a week and sits inside the release pipelines, cloud workloads, and agent frameworks of over 2,500 organizations. That footprint is exactly why it was a target.

A Key Nobody Rotated for 136 Days

The attack did not start on October 21. It started on May 27, when a LiteLLM developer accidentally committed a config file containing a master key to a public GitHub repository. The key was noticed. It was not rotated. For 136 days it sat there, accessible to anyone who looked.

On October 10, an attacker used that key to access the LiteLLM Agent Platform and pull a GitHub CLI OAuth token. From there, they moved laterally through LiteLLM’s CI/CD infrastructure, injecting malicious workflow steps that harvested additional tokens from two engineers with release permissions. Eleven days later they published 1.107.0. The entire escalation traces back to one credential that should have been revoked in June. The Register’s root-cause analysis has the full timeline.

What the Malware Actually Did

The 1.107.0 wheels installed three files into Python’s site-packages: cook.pth, cook.py, and a modified sitecustomize.py. The .pth file is processed on every Python startup — it imports cook, which launches PRIVCOLLECT, the credential harvester, in a daemon thread. You did not need to call LiteLLM for the malware to run. Installing the package was enough.

PRIVCOLLECT collected everything it could reach: AWS, GCP, and Azure credentials; Kubernetes and Docker configs; Git, GitHub, npm, PyPI, SSH, GPG, and TLS key material; browser passwords and cookies; environment variables; and, on hosts running the LiteLLM proxy, the contents of the proxy’s own credential tables in the database. All of it was encrypted and sent to www.litellm[.]dev, an attacker-controlled domain designed to look legitimate. The sitecustomize.py backdoor checked in hourly for additional Python payloads to execute. Microsoft’s technical deep-dive covers the full payload mechanics.

This Was Not a One-Off

This is the second time LiteLLM has been compromised in 2026. In March, a group called TeamPCP poisoned versions 1.82.7 and 1.82.8 with a nearly identical credential stealer. The October attack was more sophisticated — it compromised the release pipeline rather than just the package — but the pattern is the same. AI infrastructure libraries are high-value targets because they sit at the boundary between application code, cloud credentials, and model provider APIs. CloudSEK estimates 2,500+ organizations and 434,000 CI/CD pipelines were in scope for the October attack alone.

What to Do Right Now

Do not run pip show litellm to check your version — that invokes Python and risks re-executing the payload. Use a file-based check instead:

# Safe check — does not trigger Python startup:
find / -path '*-packages/litellm-1.107.0.dist-info' -type d 2>/dev/null

# Also scan for the malicious files directly:
find /path/to/venv -type f \( -name "cook.pth" -o -name "cook.py" \) -print

If either command returns a result, assume the environment is compromised. Rotate the following from a clean machine — not from the affected host:

  • All model-provider API keys (OpenAI, Anthropic, Gemini, Cohere, etc.)
  • AWS IAM credentials, GCP service account keys, Azure managed identity secrets
  • GitHub, GitLab, and npm personal access tokens
  • CI/CD pipeline secrets and deployment keys
  • SSH keys and GPG keys accessible from that environment
  • Database connection strings (especially if the LiteLLM proxy was running)

Pin your LiteLLM installation to 1.106.2 or the latest clean release. The official LiteLLM incident report confirms that only 1.107.0 is affected on PyPI. Their own post-mortem states bluntly: “This incident has provided a strong illustration of the risks associated with failing to rotate a potentially exposed key.”

They are not wrong. A master key that lived in a public repo for 136 days caused one of the largest AI supply chain compromises of the year. The technical sophistication of the attack mattered less than the operational failure that made it possible. The most effective defense against this class of attack is not a scanner or a SIEM — it is rotating credentials when they are exposed, without exception, the same day. Help Net Security has ongoing coverage of the incident response.

ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *

    More in:News