Attackers hijack LiteLLM releases to distribute credential-stealing malware
Malicious Python startup files could run without importing LiteLLM. The affected packages and images are removed, but exposed environments need more than a version rollback.
Loading page…
Malicious Python startup files could run without importing LiteLLM. The affected packages and images are removed, but exposed environments need more than a version rollback.
Listen to this story
LiteLLM’s October 21 release compromise exposed users to more than stolen model-provider keys: the payload sought cloud identities, developer credentials, private keys, browser data and AI coding-tool authentication. All seven Python wheels for version 1.107.0 and images behind floating tags were affected, although LiteLLM says its private enterprise registry was not. The company has contained the incident but has not identified how attackers obtained engineer tokens or ruled out further account access; affected users should rebuild clean environments and rotate accessible secrets.
The malicious wheels installed Python startup hooks that could run before application code, while merely downloading or inspecting a wheel did not trigger them.
Attackers used credentials tied to three engineers’ GitHub accounts to alter the release pipeline, approve a run and delete workflow records.
Socket found a separate remote-code loader, but its changeable download pointer was empty at 13:01:44 UTC; the credential collector remained independent.
LiteLLM’s official source tag was clean. The software distributed under that version was not. On October 21, 2026, attackers hijacked the project’s release pipeline to publish malicious Python packages and container images. The compromised release, version 1.107.0, carried credential-stealing malware and tools for remote code execution, prompting warnings to treat affected environments as compromised.
LiteLLM provides a common interface and proxy for AI model providers. Socket’s malware analysis found targets extending beyond those providers’ access keys: cloud identities, developer credentials, private keys, browser data and AI coding-tool authentication files. The payload could therefore reach secrets outside the gateway’s immediate job.
In its incident report, LiteLLM said attackers used credentials associated with three engineers’ GitHub accounts, apparently stolen GitHub CLI OAuth tokens. One account changed the release pipeline and triggered a release run; another approved it. Credentials associated with a third account deleted workflow records, limiting the logs available to investigators.
The company said the malicious artifacts were built from an attacker-controlled repository. Container build records identified Berri-AI/litellm, a name differing by one hyphen from the legitimate BerriAI/litellm project. Upwind’s original investigation found the payload absent from the official version tag but present in the distributed packages. Inspecting that tag alone would have missed the malicious files.
Exposure was not limited to users explicitly choosing 1.107.0. Container labels such as latest, main-latest and main-stable also pointed to compromised images. LiteLLM said its private enterprise registry was unaffected. The company has revoked the involved tokens, temporarily removed all but one unaffected GitHub organization member, and removed registry trust links to the organization.
The wheels installed three files into Python’s library directory: cook.pth, cook.py and sitecustomize.py. Python normally processes these startup hooks before application code runs. That allowed the payload to execute without an application importing LiteLLM. Simply downloading a wheel or inspecting its archive as data did not trigger those hooks, according to Socket.
The collector sought readable secrets across the host, including other processes’ environment variables on Linux and cloud instance credentials. It also specifically targeted LiteLLM deployments with a configured database connection, attempting to query saved credentials and model settings. Socket cautioned that this code did not demonstrate successful access to any particular deployment or decryption of every returned credential.
Collected information was encrypted, packed into an archive and sent to an attacker endpoint disguised as a health check. A separate background loader could fetch and execute remotely supplied Python without checking a signature or content hash. Its destination came from a changeable file hosted in a GitHub repository.
Socket found that pointer empty at 13:01:44 UTC, preventing the loader from reaching its download stage at that moment. That did not disable the independent credential collector. The analysis also found platform limits: some database and browser-password routines would not work on ordinary macOS installations, while other collection modules remained applicable.
LiteLLM warns against beginning cleanup with pip, Python’s package manager: starting it can run the malicious hooks again. Its guidance favors rebuilding container images and isolated Python environments from scratch rather than relying on a package reinstall. Removing only LiteLLM’s own directory would leave the startup files and an existing background process untouched.
LiteLLM labels the incident contained, with its investigation continuing. It has not identified how the attackers obtained the GitHub tokens and says it cannot yet assert that no further access to those accounts remains.
Editorial analysis
The approval process is a consequential part of this incident. LiteLLM says one compromised account changed the release workflow and another approved production publication. That suggests multiple approvals offer limited protection when attackers can control the identities on both sides of the gate. The next important disclosure is how the GitHub tokens were obtained—and whether that route has been closed. Revoking the known tokens and restricting organization membership address identified access, but LiteLLM’s own uncertainty about token acquisition leaves the durability of containment as the key question.
Loading discussion...
Join the conversation
Explain whether convenience or control would matter more to you.
Be the first to share a perspective or an experience.
Reader comments
Newest comments first. Replies stay oldest first.