LiteLLM’s October 21 release turned a tool trusted with AI credentials into software built to steal them. Socket’s analysis of version 1.107.0 found malicious Python startup files in its distributed packages. Wiz independently analyzed the credential stealer. Users could trigger it simply by starting Python in an affected environment, without importing LiteLLM.
The company behind the project, BerriAI, had already hardened its release process after a March compromise. Its March 30 engineering post described separated repositories, Trusted Publishing and image signing. Its October incident report says the attacker manipulated that process into signing and publishing poisoned artifacts. I want the industry to explain that failure without pretending another security feature list settles it.
An official release with an unofficial source
According to LiteLLM’s investigation, the attacker held three engineers’ GitHub CLI credentials. One belonged to an organization owner. An attempt to change the release workflow initially failed its protections; the privileged credential was then used to disable those protections and force through the change. A second account satisfied the production approval gate. Credentials associated with a third account deleted workflow records.
The modified workflow built from Berri-AI/litellm, a lookalike of the legitimate BerriAI/litellm. The hyphen was deliberate. Socket independently retrieved container provenance recording the lookalike source and matched its malicious files to an inspected PyPI wheel. Wiz traced the attacker’s commits in that repository. Those findings corroborate the source substitution; they do not independently prove how the developer credentials were stolen.
The official GitHub release tag was no safe guide to the distributed files. LiteLLM says the tag did not contain the malware, while Socket identified the malicious packaging changes in the alternate source. Reviewing the intended code and trusting a familiar publisher could still leave users running something else.
Signing and provenance remain useful. Here, the vendor’s account describes a release process authorized to bless the attacker’s chosen source. The build needs an enforced policy specifying which repository it may use. A receipt showing the wrong source is valuable evidence after a breach; it should also be grounds to reject the build before publication.
Response logs can become credential stores
LiteLLM says it observed situations where Anthropic’s Claude Code included a user’s GitHub CLI OAuth token in a response body. If those bodies are logged, the token can enter LiteLLM’s logs. LiteLLM believes the attacker obtained tokens from its internal deployment, which was exposed to the public internet and contained an unexpected user account. It had not confirmed how the attacker first accessed the deployment.
Wiz quotes the same company account, rather than independently verifying how the tokens leaked. That account deserves investigation by Anthropic as well as LiteLLM. The initial exposure remains a question in an ongoing investigation.
Under LiteLLM’s explanation, a response log became a store of credentials carrying release authority. Keeping such a log should carry the security obligations of keeping a credential vault. Calling it debugging data does nothing to reduce its power.
Centralizing model access can improve security. LiteLLM’s gateway documentation describes virtual keys and access controls that let applications use models through a common endpoint. Those are real benefits. They also make the gateway and its administrators consequential targets. I want this software to exist, with much stricter separation between the traffic it observes and the authority used to publish it.
The damage reaches past the gateway
The payload targeted much more than provider keys. Socket found collection routines targeting cloud credentials, SSH and GPG keys, browser databases, process environments and AI tool authentication files. Wiz’s analysis independently describes the broad credential collection. Socket also found queries aimed at LiteLLM’s saved provider credentials and model configuration. It explicitly cautions that those queries do not prove successful access to a particular database or decryption of every returned value.
A compromised dependency can attempt to collect whatever its process can read. Runtime isolation limits what is available. Giving a gateway unrelated developer sessions or powerful infrastructure credentials expands the damage one poisoned release can attempt. The package’s intended job places no such limit on malicious code.
The trigger made remediation hazardous too. Socket found a .pth file that imports the collector during normal Python startup, plus a sitecustomize.py loader. Python’s own documentation explains both startup mechanisms. LiteLLM therefore warns affected users against starting with pip, since invoking it can run the malicious hooks again. Its guidance calls for rebuilding affected environments and rotating reachable secrets. Removing a package cannot recall credentials already copied.
Transparency has to change the design
Containment was comparatively quick. LiteLLM reports that the seven malicious PyPI wheels were available from 11:39:51 to 13:23 UTC, with affected Docker Hub tags removed or repointed by 14:20. Socket says its scanner flagged the wheels seven minutes after publication. The project deserves credit for publishing a detailed account of its own failures.
The scale still needs honest arithmetic. Socket puts LiteLLM at roughly 23 million weekly downloads. That measures the project’s distribution, not distinct developers or victims. It cannot tell us how many machines ran the compromised release. The documented failure is serious enough without inflating the count.
Response logging should exclude secrets. Release approval should survive the theft of ordinary developer sessions, and the build should reject an unexpected repository. The runtime should have access only to credentials needed for its work. Each addresses a different failure. None makes the others dispensable.
BerriAI owns its release decisions, including the release permissions it says it temporarily expanded. Open source users deserve the same seriousness about their credentials as customers buying a managed service. LiteLLM’s transparency is welcome. The company still owes users controls that keep stolen developer sessions from authorizing the next poisoned release.