A malicious LiteLLM release could steal credentials as soon as Python started. Teams that ran it should rebuild affected environments and rotate every secret the process could reach.
If your team installed LiteLLM 1.107.0 or ran one of its affected container tags on 21 October, treat that environment as compromised.
Do not begin by running another pip install inside it.
LiteLLM says attackers compromised its release pipeline and published malicious packages through PyPI and official container registries. The poisoned release contained credential-stealing malware and code that could load more attacker-controlled software.
The incident has been contained and the affected artifacts have been removed. That does not clean a machine that already ran them.
The key facts
- The affected PyPI version was
litellm==1.107.0. - All seven wheels for that version were malicious, according to LiteLLM.
- The affected Docker tags included
v1.107.0,latest,main-latestandmain-stableduring a limited period on 21 October. - LiteLLM says versions published before 1.107.0 were safe from this incident.
- Its private enterprise registry was not affected.
- Simply uninstalling the package is not a complete recovery.
- Any credential accessible to the affected process may need to be rotated.
Why this incident is unusually serious
LiteLLM is commonly used as a gateway between an application and multiple AI providers.
That position can give it access to OpenAI, Anthropic, Google and other provider keys. It may also hold database credentials, cloud identities, proxy keys and routing settings.
The malicious package did not need an application to import LiteLLM before it could run. Microsoft found that it used Python startup mechanisms. Starting Python in an affected environment could trigger the payload.
That widens the possible impact beyond a production AI gateway. Developer laptops, build agents, test systems and containers may also be exposed if the affected package was present when Python started.
Exactly which artifacts were affected
LiteLLM lists the following artifacts:
| Distribution | Affected artifact | Reported exposure window on 21 October 2026 |
|---|---|---|
| PyPI | litellm==1.107.0 |
11:39:51 to 13:23 UTC |
| Docker Hub | v1.107.0, latest, main-latest, main-stable |
11:46:56 to 14:20 UTC |
| GitHub Container Registry | The same moving tags and 1.107.0 images | From 11:46:56 until removal began by 13:51 UTC |
The GitHub source tag for 1.107.0 did not contain the malicious files. LiteLLM says the release system was redirected to a lookalike repository controlled by the attacker.
This difference matters. A team may compare the installed package with the public source tag and wrongly conclude that everything is clean.
What the malware could collect
Microsoft says the credential collector targeted information available to the affected process, including:
- cloud credentials;
- developer and source-control tokens;
- browser credentials and session data;
- SSH material;
- environment variables;
- AI provider keys;
- LiteLLM database records and configuration.
On Unix-based systems, a second path could retrieve and execute additional Python code. Microsoft said that capability existed, although it had not confirmed that the attacker used it.
How to check whether you were exposed
Start with package, image and deployment records outside the affected environment where possible.
Check whether any system:
- installed LiteLLM 1.107.0 from PyPI;
- used an unpinned LiteLLM dependency during the PyPI exposure window;
- started one of the affected Docker tags during the container exposure window; or
- executed the compromised image digest listed in LiteLLM’s incident notice.
LiteLLM says a system that started Python with version 1.107.0 installed should be treated as compromised.
Files such as litellm-1.107.0.dist-info, cook.pth, cook.py and sitecustomize.py can provide evidence. Their absence does not prove that the machine was safe. Temporary files may disappear, and containers may be deleted.
Do not run pip first
This is the easiest mistake to make.
LiteLLM warns that starting Python in the affected environment can run the malicious startup files again. The pip command itself starts Python.
The safer response is to isolate the environment and follow the maintainer’s incident guidance from a trusted shell or clean system.
For most organisations, rebuilding the virtual environment, container or host from a known-clean source is safer than trying to remove individual files.
What affected teams should do
The exact response depends on the system, but the minimum plan is:
- Isolate the affected machine, container or build agent.
- Preserve logs and deployment records before destroying evidence.
- Rebuild the environment from a known-clean base.
- Pin LiteLLM to a trusted explicit version approved by your team.
- Rotate every secret the affected identity could access.
- Review cloud, source-control, AI provider and database activity for misuse.
- Check internal package mirrors and container registries for copied artifacts.
- Investigate downstream systems reached with the same credentials.
LiteLLM initially advised pinning to 1.106.2 or another explicit earlier version. Follow its current incident page when acting, because recovery guidance can change.
Which credentials need attention
Do not rotate only the OpenAI or Anthropic key.
Think in terms of the affected process identity. What could that process read or request?
That may include:
- cloud instance or task roles;
- Kubernetes service-account tokens;
- GitHub or GitLab tokens;
- database passwords;
- LiteLLM master and virtual keys;
- secrets stored in environment variables;
- SSH and signing keys;
- browser sessions on a developer workstation;
- credentials available through a CI/CD secret store.
Rotate the credentials from a clean device. Then review activity before and after the exposure time.
How the release pipeline was bypassed
LiteLLM says the attacker obtained multiple developer GitHub credentials.
The attacker used a privileged token to override branch protections, changed the release workflow and pointed it at a lookalike repository named Berri-AI/litellm instead of the legitimate BerriAI/litellm repository. A second credential was then used to pass a production approval step.
The poisoned code was signed and published through the project’s official release path.
This is an important supply-chain lesson. Signed software can still be malicious if an attacker controls the system that decides what gets signed.
What software teams should change
Moving tags such as latest make emergency investigation harder. Production deployments should use an approved version and, where practical, a verified image digest.
Teams should also keep a record of which artifact reached each environment. A software bill of materials helps, but deployment logs and image digests are equally important during an active incident.
Release approvals should not depend only on the identity of the person clicking a button. The release system should verify the source repository, commit and artifact provenance that were reviewed.
Finally, secrets exposed to AI infrastructure deserve the same controls as payment, identity and production database credentials. An AI gateway is now part of the security boundary.
What to do today
- Search package and container history for LiteLLM 1.107.0.
- Check whether moving Docker tags were pulled during the affected window.
- Isolate and rebuild any exposed environment.
- Rotate all reachable secrets from a clean system.
- Review cloud and source-control logs for suspicious use.
- Pin dependencies and container digests for future deployments.
- Follow the canonical LiteLLM incident record for updated guidance.
Evidence note: Official incident record, CERT-In advisory and Microsoft technical analysis. No hands-on testing.