LiteLLM 1.107.0: the PyPI wheels and the official Docker images carried a credential stealer and a dormant remote-code loader that Python starts at every launch, published through the maintainers' own release workflow with stolen developer tokens
LiteLLM 1.107.0 on PyPI and in the official images stole cloud and AI credentials; removing the package does not stop it
Defender actions
- Find every host, build agent and container that installed litellm 1.107.0 from PyPI between 11:39 and 13:23 UTC on 2026-10-21, or pulled the v1.107.0, latest, main-latest or main-stable tag of the official GHCR or Docker Hub LiteLLM images between 11:46 and 14:20 UTC; treat each as compromised, inspect it with tooling that does not start Python in the affected environment, rebuild it from a reviewed artifact pinned to 1.106.2 or an image digest, and rotate every cloud, Kubernetes, registry, SSH, database and AI-provider credential it could read, including the provider keys stored in a LiteLLM proxy database.
Analysis
Socket reports that LiteLLM 1.107.0, an open-source LLM gateway, carries malicious Python startup files in all seven wheels, and that Upwind found the same payload in the published images (Socket, 2026-10-21). A startup hook and a second startup module in the Python library directory run at every Python start without the application importing LiteLLM: the first collects cloud, Kubernetes, CI, registry and database credentials, SSH, GPG and TLS private keys, browser stores, AI-tool credential files, environment variables and, where configured, the credentials saved in a LiteLLM proxy database; the second forks a detached loader that polls a file in a GitHub repository for a domain and would execute Python downloaded from it with no signature or hash check, though at 13:01 UTC the pointer returned an empty body, which stops the loader before its download stage (Socket, 2026-10-21).
The payload is not in the git tag: a packaging setting in an untagged commit pulls it into the wheel, and the container build provenance records a source repository named Berri-AI/litellm, one hyphen away from BerriAI/litellm (Socket, 2026-10-21). The maintainers' root-cause post of 2026-10-23 traces the chain to a configuration file committed on 2026-05-27 to a public repository with the administrative key of an experimental internal agent service; a follow-up commit deleted the file about three hours later, but the original commit stayed in the repository's public history until 2026-10-22 and the key was never revoked (LiteLLM, 2026-10-23). On 2026-10-10 the attacker used that key against the service's API, which returned the GitHub CLI OAuth token of an organization owner, not a service account and not scoped down, and from then on the attacker held owner-level access to every repository; such CLI tokens are post-2FA and exempt from GitHub's re-authentication for sensitive actions (LiteLLM, 2026-10-23). With it the attacker pushed throwaway branches whose workflows posted CI secrets to an external capture endpoint, yielding the CLI tokens of two maintainers, and deleted the workflow runs minutes later (LiteLLM, 2026-10-23). Socket found secret-exfiltration workflows running in the repository on 2026-10-10 from its Actions performance metrics, eleven days before the release attack, says it has not established how the attacker first obtained access and does not claim that the 2026-10-10 theft produced the access used on 2026-10-21, while LiteLLM says its audit logs tie the token stolen on 2026-10-10 to the approval of the release (Socket, 2026-10-23). On 2026-10-21 a push to the private release-orchestration repository with a maintainer's token was rejected by branch protection, and the owner's token then overrode it so that the build could be pointed at the look-alike repository; the owner's token dispatched the staging build, a second maintainer's token approved the production gate, a third maintainer's token deleted the run records, and the owner's token force-pushed the history clean, after the maintainers had relaxed the release rule earlier that week so that any two engineers could trigger and approve a release (LiteLLM, 2026-10-23). PyPI quarantined 1.107.0 and the images were pulled the same day (Aikido, 2026-10-21; LiteLLM, 2026-10-21).
Cited evidence
Endpoint observations on Windows and macOS matched the recovered collector’s discovery, encryption, and outbound-connection behavior.
In one Windows example, a routine Python invocation to install an unrelated dependency activated the collector.
contains malicious Python startup files that collect cloud credentials, private keys, browser data, and authentication files for AI development tools
starting Python or pip in an affected environment to inspect or repair the installation can execute the payload again
removing the LiteLLM package directory alone does not remove those files or stop an existing process
We have identified that the malicious actions were taken through three engineers' GitHub accounts, appearing to be by way of stolen GitHub CLI OAuth tokens.
On October 10th, the threat actor used this key to gain control of our LiteLLM Agent Platform deployment.
Because of human error, nobody followed through on revoking the administrative key to the LiteLLM Agent Platform, so it was still valid more than four months later.
Each credential was checked with sts:GetCallerIdentity, followed by bedrock:ListFoundationModels and a ListModels call, consistent with LLMjacking.
PyPI has now quarantined and removed version 1.107.0.
Updates3
The maintainers published a root-cause post on 2026-10-23 that supersedes the earlier hypothesis that the tokens were read from the logs of an internet-exposed internal deployment: their request logs show the first token came from a different service, an experimental agent platform whose administrative key had been committed to a public repository on 2026-05-27 and never revoked (LiteLLM, 2026-10-23). The attacker used the key on 2026-10-10 to obtain an organization owner's GitHub CLI token, so access began eleven days before the release, and the same day throwaway branches in two repositories ran workflows that posted CI secrets to an external capture endpoint and were deleted minutes later, yielding the tokens of two further maintainers (LiteLLM, 2026-10-23).
Socket found the same activity independently from the repository's Actions performance metrics, including a second run on 2026-10-12 that took 14 further secrets, and says it has not established how the attacker first obtained access (Socket, 2026-10-23). On 2026-10-21 three credentials did different jobs: the owner's token overrode branch protection and later force-pushed the history clean, a second maintainer's token approved the production gate and a third maintainer's token deleted the run records, after the maintainers had relaxed the release rule earlier that week so that any two engineers could trigger and approve a release (LiteLLM, 2026-10-23). The maintainers say they are revoking every token tied to every internal system and vendor platform, and that the attacker's activity on other systems focused on upstream inference API tokens (LiteLLM, 2026-10-23).
Microsoft Threat Intelligence's analysis of 2026-10-23 adds that endpoint observations on Windows and macOS matched the collector's discovery, encryption and outbound-connection behaviour, and that in one Windows case a routine Python invocation to install an unrelated dependency activated it, so developer workstations on Windows and macOS are in scope as well, not only gateways, CI runners and containers (Microsoft Threat Intelligence, 2026-10-23). Microsoft advises isolating affected hosts and investigating them from a known-clean system without running python, pip or other commands that invoke the affected interpreter, confirming that the malicious startup files are gone from the library path rather than assuming that deleting the litellm directory removed them, and it treats Python-launched OpenSSL public-key encryption of files staged in a temporary directory as a behavioural lead (Microsoft Threat Intelligence, 2026-10-23).
The maintainers have rewritten their root-cause post since it was first published: it now calls the leaked credential an administrative key to the LiteLLM Agent Platform, says a follow-up commit deleted the file about three hours after the 2026-05-27 commit but the original commit stayed in the repository's public history until 2026-10-22, and attributes the missed revocation to human error, which left the key valid more than four months later (LiteLLM, 2026-10-23). The post now describes the 2026-10-10 step as the attacker using the key to gain control of the Agent Platform deployment, whose API returned the organization owner's GitHub CLI token (LiteLLM, 2026-10-23).
Sources8
Revision history
- Published 2026-10-22T0256Z-intel
- Update 2026-10-24T0255Z-intel
The maintainers' root-cause post of 2026-10-23 replaces the earlier log-leak hypothesis: a master key committed to a public repository on 2026-05-27 and never revoked gave the attacker an organization owner's GitHub CLI token on 2026-10-10, eleven days before the release, and Socket independently found secret-stealing workflows running that day.
Changed: body evidence sources sourcing_note summary techniques
- Improvement 2026-10-25T1308Z-audit
Adds Microsoft Threat Intelligence's analysis of 2026-10-23: the collector ran on Windows and macOS endpoints too, a routine Python call activated it, and responders should investigate without starting Python in the affected environment.
Changed: evidence sources body
- Correction 2026-11-08T1309Z-audit
The maintainers rewrote their root-cause post after it was first published: the leaked credential was an administrative key, a follow-up commit deleted the file while the original commit stayed in the public history until 2026-10-22, and the key was never revoked; two quotes no longer on the page are replaced.
Changed: body evidence summary
AI-generated · no human review · this permalink is the shareable record for the finding · verify operationally critical claims against the linked primary source.