LiteLLM 1.107.0 Supply-Chain Attack Used Leaked Key to Publish Malicious Build

· Original article ↗

Summary

On Oct. 21, 2026, attackers used a leaked key and lookalike fork to publish compromised LiteLLM 1.107.0 artifacts. Researchers observed stolen cloud credentials used to query Bedrock. The article details exposure scoping and recovery steps.

Key points

  • On Oct. 21, LiteLLM’s official release pipeline built, signed, and published version 1.107.0 from an attacker-controlled lookalike fork; the source tag was clean and the images had a valid signature.
  • All seven PyPI wheels for 1.107.0 and images behind four tags on Docker Hub and GHCR were affected; caches and downstream images could extend exposure.
  • The wheels installed cook.pth, cook.py, and sitecustomize.py outside the LiteLLM package, where Python could run them at interpreter startup; a separate loader could fetch more code.
  • Attackers used a leaked administrative key to obtain GitHub tokens, override branch protection, point the staging build at the lookalike fork, and approve production.
  • Public research observed AWS instance-role credentials taken from CI runners and Kubernetes nodes being validated and later used to list Amazon Bedrock models.
  • The article advises isolating and safely inspecting affected environments, rotating and revoking reachable credentials, reviewing identity and cloud logs, and rebuilding from verified artifacts.
  • A valid signature alone did not establish which source was built; the article recommends checking source and revision, pinning hashes or digests, and using short-lived, narrowly scoped release credentials.

Article Details

Defense Focus
Determine whether LiteLLM 1.107.0 artifacts ran, scope exposed credentials and workloads, and verify that deployment controls check artifact provenance as well as signatures.
Detection Methods
  • Inventory direct and transitive dependencies, lock files, CI runners, developer environments, private mirrors, image caches, and downstream images for affected packages or base digests.
  • On affected hosts, inspect for cook.pth, cook.py, sitecustomize.py, and a detached Python process holding /tmp/remote_code_loader.lock.
  • Review cloud, identity, model-provider, and source-control logs for activity after exposure, including workload-role GetCallerIdentity calls and subsequent model-listing activity.
  • Check image provenance for the expected source repository and revision, builder workflow, and signing identity; verify keyless releases using certificate identity and OIDC issuer.
Data Sources
  • Filesystem, process, network, and identity evidence from affected hosts
  • Package manifests, lock files, installed packages, image base digests, and artifact digests
  • Build logs, CI/CD runner records, repository and release-pipeline activity
  • Cloud, identity, model-provider, and source-control logs
  • Container, cloud, Kubernetes, and AI workload inventory
Rule Types
  • Qualys Query Language (QQL) searches
  • Artifact signature and provenance validation policies checking source repository and revision
Platforms
  • AI workload inventory showing installation, execution, and communication status
  • Container inventory linked with Kubernetes metadata and host/container relationships
  • CI/CD code-to-image correlation and deployment inventory
Defensive Actions
  • Treat environments that ran an affected artifact as compromised; isolate workloads and preserve evidence.
  • Inspect suspect environments from a known-clean system to avoid retriggering Python startup payloads.
  • Rotate reachable credentials, revoke sessions, and review identity activity; prioritize credentials that can mint tokens or change production.
  • Rebuild and redeploy from a verified release on clean infrastructure; rebuild downstream images and confirm the digests actually running.
  • Pin approved package hashes and image digests; require independent approval for build-source changes and use short-lived, narrowly scoped release credentials.
  • Restrict egress and use separate identities per environment; continue monitoring exposed identities after affected workloads are removed.

MITRE ATT&CK

Vendors

Products

Tools

Related Articles