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

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
T1059.006 · PythonThe compromised wheels installed Python startup files, including cook.pth, cook.py, and sitecustomize.py, that could run the credential collector when Python launched.T1078 · Valid AccountsThe attacker used an organization owner's GitHub CLI token to override branch protection and a second stolen token to approve production.T1105 · Ingress Tool TransferThe article says a separate loader could fetch further code from an attacker-controlled server.T1195.002 · Compromise Software Supply ChainAttackers redirected LiteLLM's staging build to a lookalike Berri-AI/litellm fork, and the official pipeline published the resulting compromised release.T1526 · Cloud Service DiscoveryThe stolen AWS instance-role credentials were reportedly used to list Amazon Bedrock models after being validated with sts: GetCallerIdentity.T1552.001 · Credentials In FilesA configuration file containing an administrative key for LiteLLM's internal Agent Platform was committed to a public repository.
Vendors
Amazon Web ServicesPublic research observed Amazon Web Services (AWS) instance-role credentials taken from continuous integration (CI) runners and Kubernetes nodes being validated with sts: GetCallerIdentity and then used to list AmazonGitHubThe v1.107.0 source tag on GitHub was clean, and the compromised images carried a valid signature.QualysHow Qualys TotalAI Helps You Scope AI Supply Chain Exposure
