Back to all articles

LiteLLM 1.107.0 compromised: exposed secrets and a hijacked release pipeline

Share

On 21 October 2026, official LiteLLM 1.107.0 distributions on PyPI and container registries carried malicious code designed to steal credentials. According to LiteLLM's definitive 23 October investigation, the attack began with a master key exposed in a public GitHub repository in May, before escalating to privileged GitHub tokens and a hijacked software release pipeline.

This case matters far beyond one Python package: a forgotten secret enabled an attacker to make a legitimate publishing workflow distribute untrusted code.

Exactly which artifacts were affected?

LiteLLM's official initial incident notice identifies:

  • PyPI: all seven wheels for litellm==1.107.0, available from 11:39 to 13:23 UTC on 21 October.
  • Docker Hub: tags v1.107.0, latest, main-latest and main-stable temporarily resolved to malicious image index sha256:1bbcb1443bc962e45f5aad53fe3d2c30600e0379715fb6c664cdd3ac126c339e, from 11:46 to 14:20 UTC.
  • GHCR: several image variants and tags were affected before being taken down or corrected.

Those artifacts have been removed or repointed. The official GitHub source tag v1.107.0 did not contain the malware: the published binaries came from an attacker-controlled lookalike repository. LiteLLM says earlier versions were not affected by this particular incident, nor was its private Enterprise registry.

A declared dependency does not, by itself, establish execution. Installing a malicious wheel or running an affected container during the exposure window, however, should trigger incident-response procedures.

How an exposed key led to trusted releases

LiteLLM's revised timeline supersedes some preliminary assumptions:

  1. 27 May: a master key for the internal LiteLLM Agent Platform was committed to a public GitHub repository and never revoked.
  2. 10 October: the attacker used that key to query the platform API, which returned a GitHub CLI token belonging to an organization owner. Temporary GitHub Actions workflows then exfiltrated additional secrets.
  3. 21 October: privileged credentials were used to override branch protection and modify the release workflow. The workflow was redirected to Berri-AI/litellm, a lookalike of the legitimate BerriAI/litellm repository.
  4. The staging and approval flow published poisoned packages and images. Workflow records were subsequently deleted, complicating investigation.

The important distinction is that this was not simply an unauthorized upload to PyPI. An approved release process was manipulated into distributing the malicious artifacts.

Why importing LiteLLM was not necessary

Microsoft Security Research's 23 October technical analysis describes a credential collector and a remote loader using Python interpreter startup mechanisms.

Files such as cook.pth, cook.py and sitecustomize.py could execute when Python initialized. Starting Python or pip in an affected environment could therefore activate the payload, even if the application never called import litellm.

The malware sought credentials accessible to developer tools, cloud workloads, AI providers and other applications. Actual reach depended on process permissions, mounted volumes and available secrets.

Practical verification and incident response

1. Inspect safely. Do not begin by running pip show or pip install inside a suspected environment: both start Python. Use a trusted system to examine dependency inventories, install logs, registry records and actual container image digests. Relevant indicators include litellm-1.107.0.dist-info, cook.pth, cook.py and sitecustomize.py. Absence of these filenames does not prove safety.

2. Contain and preserve evidence. Restrict network access, capture relevant hosts, containers, mounted volumes and logs, and record times and hashes before cleaning an environment subject to an authorized investigation. Ephemeral containers may have removed local traces.

3. Rebuild from verified sources. Prefer clean virtual environments and freshly built images with explicitly pinned, verified dependencies. LiteLLM originally advised pinning 1.106.2; consult newer vendor guidance before selecting a production version.

4. Rotate reachable secrets. Assess cloud roles, GitHub credentials, AI provider API keys, CI/CD tokens, database passwords and any secrets exposed through environment variables, files or secret managers. Perform revocations and rotation from trusted infrastructure, and investigate unusual subsequent use.

5. Hunt for follow-on activity. Correlate IAM, GitHub, proxy, DNS and outbound traffic around installation and execution times. Exposure does not prove successful exfiltration, while the lack of a local marker does not rule it out.

What enterprises and AI teams should learn

Deleting a secret from a Git commit does not revoke the credential. Teams should inventory secrets, use short-lived credentials wherever practical, apply least privilege, isolate workloads and review what AI tools and agents can read or execute.

CI/CD protections should address release permissions, repository identity, provenance of built artifacts and audit logs resistant to tampering. Signing remains valuable, but a signed artifact is not automatically safe if an authorized build process is compromised.

This incident complements our coverage of AI-assisted autonomous attack campaigns and independent safety controls for AI agents. For GLOV Consulting, it illustrates operational risk, dependency visibility and access governance. For GLOV AI, a service still in preparation, it offers a practical security-by-design case study.

What remains unknown

Public reporting does not establish a complete count of affected organizations or confirmed secret theft. The vendor revised early theories in its 23 October report, which should take precedence over its initial assumptions. Distinguish downloading, installing, executing and confirmed exfiltration rather than treating them as interchangeable.

GLOV Solutions editorial analysis — sources checked as of 27 October 2026. No compromise of GLOV Solutions is alleged.

Sources

Related articles

Back to all articles