News Cyber Attacks
One Forgotten Key: LiteLLM Traces Malicious 1.107.0 Release to a Master Key Leaked on GitHub in May
LiteLLM's root-cause analysis says a master key accidentally committed to a public repository in May, and never revoked, handed the attacker a GitHub organization owner's token. From there, stolen maintainer tokens were used to build, approve and publish a backdoored release, then wipe the evidence.

Key takeaways
- LiteLLM says a master key committed to a public repo on May 27 was never revoked and gave the attacker an org owner's GitHub CLI token on October 10.
- The attacker used CI workflows to steal two more maintainer tokens, then used three identities to build, approve and hide the malicious release.
- The release was built from the lookalike repository Berri-AI/litellm after branch protection was overridden with the owner's token.
- litellm 1.107.0 was live on PyPI from 11:39 to 13:23 UTC on October 21; Docker Hub tags until 14:20 UTC.
- LiteLLM's earlier theory that tokens leaked from AI gateway logs was superseded by the October 23 root-cause analysis.
LiteLLM has published the full attack chain behind the compromised litellm==1.107.0 release, and it starts with a key that was exposed five months earlier and never revoked.
The popular open-source AI gateway library pushed a malicious 1.107.0 release to PyPI, Docker Hub and GHCR on October 21, 2026. The release carried compiled malware that steals credentials and loads remote-code-execution tools. In a root-cause analysis published on October 23, LiteLLM said its investigation was complete and that the new post replaces earlier status updates, some of which turned out to be inaccurate.
How did the attacker get in? #
On May 27, 2026, a configuration file containing the master key to a deployment of the LiteLLM Agent Platform, an experimental tool LiteLLM used to orchestrate agents that file pull requests, was committed to the public LiteLLM-Labs/lite-harness repository. LiteLLM says the mistake was spotted quickly and the commit was force-pushed over, but the master key was never revoked.
That platform held a GitHub CLI OAuth token belonging to one of LiteLLM's GitHub organization owners. LiteLLM says the token was not tied to a service account and was not scoped down. GitHub CLI tokens are issued after two-factor authentication and are not subject to GitHub's re-authentication prompts for sensitive actions.
What happened next? #
All times below are UTC, from LiteLLM's timeline.
| Date and time | What happened |
|---|---|
| May 27, 18:53 | Agent Platform master key committed to a public repository |
| Oct 10, 21:27 | Using the master key, the attacker queries the Agent Platform API, which returns the org owner's GitHub CLI token |
| Oct 10, 22:11 to 22:14 | Throwaway branches run workflows that post CI secrets to a webhook.site endpoint, exposing tokens of two more maintainers; the runs are deleted |
| Oct 12 | Further workflows exfiltrate secrets from several private repositories |
| Oct 21, 10:08 | A push to the release repository is rejected by branch protection, then forced through five seconds later using the owner's token |
| Oct 21, 10:46 | Staging build dispatched from the lookalike repository Berri-AI/litellm |
| Oct 21, 11:11 | Production gate approved with a second maintainer's stolen token |
| Oct 21, 11:39 to 11:46 | Seven malicious wheels go to PyPI; Docker Hub and GHCR images follow |
| Oct 21, 11:53 to 12:24 | A third maintainer's token deletes the run records; history is force-pushed clean |
| Oct 21, 12:06 | Community member LidorMachluf opens GitHub issue #47826 flagging the compromise |
| Oct 21, by 13:23 | PyPI quarantines 1.107.0 |
| Oct 21, 14:20 | Docker Hub tags removed or repointed to clean images |
LiteLLM says its normal release flow requires approval from a special account locked to a physical device in its office. That rule had been relaxed earlier that week so any two engineers could trigger and approve releases for faster bugfix backports. The attacker used one stolen token to trigger the release and another to approve it. LiteLLM notes that with an org owner's token the attacker could have removed the restriction anyway, and believes separate tokens were used to keep audit logs quieter.
What changed from LiteLLM's first explanation? #
LiteLLM's first incident post suspected the GitHub tokens were taken from logs of an internal LiteLLM deployment, and described cases where Claude Code could embed a user's GitHub CLI token in a response body that might be logged. The October 23 analysis says request logs show the first token actually came from the Agent Platform API, as described above. LiteLLM has left the original post unchanged as a record but calls the new analysis the canonical account.
LiteLLM does not name the attacker. It describes the malware as stealing credentials and loading remote-code-execution tools, and says the attacker also went after tokens for internal systems, with a focus on upstream inference API keys.
Which artifacts were compromised? #
| Registry | Affected | Window (UTC, Oct 21) |
|---|---|---|
| PyPI | litellm==1.107.0, all seven wheels |
11:39:51 to 13:23 |
| Docker Hub | v1.107.0, latest, main-latest, main-stable |
11:46:56 to 14:20 |
| GHCR | v1.107.0, latest, main-latest, main-stable (litellm, litellm-database, litellm-non_root) |
11:46:56 to 13:51 |
LiteLLM says the official 1.107.0 source tag on GitHub does not contain the malicious files, and that enterprise customers using its private registry were not affected. This is LiteLLM's second supply-chain compromise this year; its first incident post refers to a prior incident in March.
How did LiteLLM respond? #
LiteLLM says it locked its public registries, removed every member from its GitHub organization except one account it trusted, and began operating as if every token and key it owned had been stolen. It is revoking every token tied to its internal systems and vendor platforms, and says it will share process changes later. In its own words, the incident shows the risks of "failing to rotate a potentially exposed key."
What should LiteLLM users do? #
- Check for exposure. If any environment ran
litellm==1.107.0, or a container used the affected tags in the windows above, treat it as compromised. Search forlitellm-1.107.0.dist-info,cook.pthandsitecustomize.py. - Do not start Python first. LiteLLM warns that any Python start, including running pip, re-executes the malicious startup files. Delete
cook.pth,cook.py,sitecustomize.pyand matching cached files from the shell, and kill the detached daemon holding/tmp/remote_code_loader.lock. - Reinstall a pinned version. Pin to
litellm==1.106.2or another earlier explicit version; rebuilding images and virtual environments from scratch is better. - Rotate everything the host could reach. That includes cloud instance roles, every provider key stored in the LiteLLM proxy database, master and virtual keys, the database password and any secret in the host's environment.
- Review cloud logs. Check for
GetCallerIdentitycalls from the instance role around install time and for use of its credentials from outside your infrastructure. - Learn the lesson for your own org. Scan repositories and history for committed secrets, revoke any exposed key immediately even if the commit is removed, and avoid giving automation tokens with owner-level, unscoped access.
Sources
Questions this raises
- Which LiteLLM version was malicious?
- Only litellm 1.107.0, published on October 21, 2026, plus the Docker Hub and GHCR tags v1.107.0, latest, main-latest and main-stable during the affected windows. LiteLLM recommends pinning to 1.106.2 or an earlier explicit version.
- How did attackers get LiteLLM's GitHub access?
- According to LiteLLM, a master key for its Agent Platform was committed to a public repository in May and never revoked. The attacker used it on October 10 to retrieve a GitHub organization owner's CLI token, then exfiltrated two more maintainer tokens through CI workflows.
- Who was behind the LiteLLM attack?
- LiteLLM has not named the threat actor. It published IP addresses, the lookalike organization Berri-AI and commit hashes as indicators.
- Were LiteLLM enterprise customers affected?
- LiteLLM says customers pulling from its private enterprise registry were not impacted.
LiteLLMPyPISupply Chain SecurityGitHub ActionsCredential TheftSecret ScanningCI/CD SecurityAI Security