On October 21 at 11:39 UTC, LiteLLM 1.107.0 was pushed to PyPI with three auto-execute files bundled in; it was quarantined at 13:20 UTC, surviving for 2 hours and 14 minutes. The same version was also tagged across four Docker labels including latest, only taken down at 13:53 UTC. What it stole wasn't code—it was the keys to over a hundred model providers sitting behind the gateway. The more convenient the aggregator, the deeper this wound cuts.
Within two hours, the malicious version climbed both PyPI and Docker
On October 21, a LiteLLM package version 1.107.0 was pushed to PyPI, with the same version simultaneously listed on GHCR and Docker Hub. It shipped with three extra files compared to the legitimate version: cook.pth, cook.py, and sitecustomize.py. The Python interpreter executes them on startup with no user action required.
Four poisoned Docker tags were published: v1.107.0, latest, main-latest, and main-stable. They were taken down at 13:53 UTC—33 minutes after PyPI. The safe version rolled back to 1.106.2.
The attacker compromised both the PyPI upload pipeline and the Docker build pipeline simultaneously—not just one channel. Conventional defenses like "I only watch PyPI alerts" or "I pin SHAs so I don't need to worry about latest drift" both failed this time.
privcollect: a single SQL query takes down an entire company's model channels
The real payload in the malicious package isn't a backdoor—it's a 16-module credential stealer called privcollect, covering browser, cloud, AI, and SSH credentials, capped off with a SQL query aimed straight at LiteLLM's PostgreSQL.
What was stolen this time wasn't open-source code or signing keys—it was the deployer's "full-stack inventory." LiteLLM positions itself as an AI gateway (a proxy server that centrally forwards requests and manages keys), storing credentials for 100+ LLM providers in its own database on behalf of users.
The attacker followed this chain to set the hook: after the malicious package installed, privcollect first scanned browser passwords and cookies, then read ~/.aws/ and IMDS(the AWS configuration directory and the cloud server's internal metadata service), packaging up GCP service accounts and Azure CLI caches along the way. For AI-specific targets, it grabbed OpenAI, Anthropic, and Cohere API keys and environment variables, and finally went after SSH private keys, GPG keys, and shell history for good measure.
The deadliest blow was reserved for LiteLLM itself. LiteLLM Proxy stores upstream provider keys in PostgreSQL, and the stealer directly ran SELECT * FROM "LiteLLM_CredentialsTable" LIMIT 500—one table pull grabbed every configured vendor credential. A single SQL query handed the attacker every model channel the victim company had connected. The data was first encrypted with AES-256-CBC(a symmetric encryption algorithm with a 256-bit key), the key was then wrapped with RSA-4096(asymmetric encryption with a 4096-bit key, used to encrypt the previous symmetric key), and exfiltrated to litellm[.]dev—a domain crafted to look official—with hardcoded X-Token and Internet Explorer 7 user-agent strings in the HTTP headers.
SELECT * FROM "LiteLLM_CredentialsTable" LIMIT 500, pulling all configured upstream provider keys in one shot. Source: embedded query in the malicious package.Traditional supply chain poisoning steals "this machine." This time, they stole "every upstream behind this machine." An AI gateway like LiteLLM concentrates keys for over a hundred providers into a single table; the stealer doesn't need to breach them one by one—one query harvests an entire company's model channels. That single line of SQL in the stealer is the highest unit-reward code in the whole incident.
This malicious code smells like it was written by an LLM
The attacker outsourced even the coding—not to a person, but to a large model. The evidence isn't in the functionality, it's in the waste: a module called exec_py is defined then left dormant, never called; the maker path stops at /tmp/.pc_once_72129118c59f5636c0bb, a Linux habit—on Windows, /tmp/ usually doesn't exist, so the write step fails silently, and the attacker never noticed.
When Wiz's analysts cracked open the malicious package, they didn't see the tight, backdoored, obfuscated tooling common in red-team operations. They saw something else. Variables named encrypted_private_key_output—overly self-explanatory.
Every sensitive operation is wrapped in a try/except safety net that swallows all exceptions. fcntl/fork(Linux-exclusive process locking and forking calls, not available on Windows) appears directly in the remote loader, crashing on any non-Linux platform.
Wiz categorizes dead code like exec_py as "fingerprints left by iterative prompting"—the happy path (the main flow when everything works) runs fine, but the edge cases are all brittle, never having gone through real-machine regression testing. Functionality: OK. Robustness: zero.
The anomaly goes beyond code quality: this package stuffs in two Python startup hooks simultaneously. cook.pth .pth file(a path configuration file auto-executed at Python startup) is responsible for pulling up the main payload cook.py; sitecustomize.py(a hook script auto-imported at Python startup) fetches a second-stage script from a GitHub dead-drop at letters9813/pythonclient-test/main/domain.txt. This combo is the first documented appearance in the wild of both running together: the former guarantees execution on install, the latter leaves a hot-updateable backdoor for delivering new payloads (at the time of analysis, domain.txt hadn't been populated yet—the attacker may still be probing).
Stacking these two facts together: the attacker used AI to accelerate coding while deploying this rare dual-hook combo. AI has lowered the bar for "writing a working malicious package" to being able to write a prompt, but the attacker's own understanding of Python startup mechanics and platform differences clearly exceeds what a model outputs by default. The fingerprints in the code have already made the attacker's confession for them.
AI coding tools write keys into logs; attackers followed the trail straight to the publish keys
The root cause isn't in upstream dependency repos—it's in the engineer's own terminal. Claude Code occasionally embeds GitHub CLI OAuth tokens in response bodies. LiteLLM writes those response bodies verbatim to disk. The tokens end up in gateway logs.
Attackers pulled these tokens from an internet-exposed internal LiteLLM deployment and followed the trail all the way to the official release pipeline. The LiteLLM team said it plainly: in certain scenarios, Claude Code writes the user's local GitHub CLI OAuth token into its own response output, and the LiteLLM gateway by default writes response bodies into logs—so the token just sits there in the gateway logs.
The entry point the attacker got barely qualifies as "sophisticated"—an internal account with an unremarkable name, exposed to the public. The team currently suspects the attacker slipped into this gateway through a recently patched vulnerability, then pulled the maintainers' tokens from the logs. LiteLLM officially stated after the incident that all related tokens have been revoked.
Once they had the tokens, the release pipeline was almost defenseless. Three maintainers' GitHub accounts were hijacked: one was used to trigger the project's release process, another to approve it—two-person review is meaningless when "both people" are controlled by the same party.
Between 08:56 UTC and 10:46 UTC on October 21, the attacker pushed 10 commits to a fork disguised as BerriAI, the poisoned code was rolled into the packaging and Docker build, and the PyPI 1.107.0 version that went live at 11:39 UTC landed on every machine that ran `pip install litellm` (see earlier section for upload and quarantine times).
AI coding tools assigned to dev teams—like Claude Code—will, without your knowledge, write your locally authenticated GitHub credentials into a place the gateway archives verbatim. LiteLLM itself markets gateway logging as a core feature; in their official docs, "AI Gateway - Logging & Observability" sits at the top of the Monitor section. Tokens landing in logs is product behavior.
Two judgments. First, the lesson isn't about LiteLLM as a single product but about the default chain of "whose logs do coding tool outputs end up in"—any deployment that concentrates multiple model providers' credentials into a public-facing gateway repeats the same exposure surface, as long as it still lets developers authenticate GitHub locally and connect the tool straight to the gateway. Second, the verifiable window for supply chain response speed depends on whether the team's "currently suspected recently patched vulnerability" holds up: if it does, the gap between patch release and attack is a quantifiable baseline, and if within 30 days neither GitHub nor Claude Code publishes a clear change stating "response bodies no longer carry OAuth tokens," the aggregator's hidden danger remains exactly where it was.
4.5 hours after release, the attacker was already at your AWS doorknob
Roughly 4.5 hours after the malicious version went live, the attacker began probing AWS credentials—this activity is the most worthwhile lead for ordinary teams to verify today.
The probing Wiz observed came in two steps: first calling sts:GetCallerIdentity(a one-shot self-report fetching the current AWS identity) to confirm the obtained role was usable, then calling bedrock:ListFoundationModels(lists available foundation model permissions) to see which models they could touch. This sequence matches the typical LLMjacking(hijacking others' cloud accounts to invoke large models for mining or resale) behavior chain: verify identity, then enumerate resources.
For most readers, the direct implication of this fact is: if during the window between the malicious version going live and being quarantined on October 21, you installed LiteLLM 1.107.0 via PyPI or Docker, or pulled the latest / main-latest / main-stable tags, your AWS credentials fall into the "should be treated as compromised" category. Wiz did not disclose "which customer's credentials were probed" because those are the victims' own cloud accounts.
Open your LiteLLM deployment and check whether any Python process installed 1.107.0, or pulled images with the latest / main-latest / main-stable tags, during the window from the malicious version's release to its quarantine on October 21.
In CloudTrail, filter for all sts:GetCallerIdentity and bedrock:ListFoundationModels calls from the afternoon of 10/21 onward. If recorded, immediately rotate that role's credentials and audit whether related Bedrock call volumes are abnormal.
Check whether LiteLLM's PostgreSQL was accessed from external IPs, focusing on whether the LiteLLM_CredentialsTable shows unexpected SELECT traces. If suspicious reads are found, treat all upstream model API keys as compromised.
Until the official full post-mortem is released, monitor LiteLLM's official blog and BerriAI's GitHub release notes: they mention a "recently patched vulnerability" as the suspected path for the internal deployment breach. Once a public PoC or patch number drops, self-check against it immediately.
Keep a critical distinction in mind: this attack chain has two phases—the first 2 hours were passive credential harvesting; active cloud probing only started after 4.5 hours. "No cloud-side activity observed" does not mean "not harvested." Handle as a credential breach first, then wait for active-behavior clues.
Fair warning before you start: none of this is a single command an ordinary reader can run. Confirming whether credentials reached the attacker means digging through your cloud account's CloudTrail(AWS's logging service that records who called what API at what time) logs and LiteLLM's PostgreSQL(the open-source database LiteLLM uses to store upstream API keys) access records—backend and security team work, not an end-user job. So the list below mixes what you can reasonably do right now with what has to wait on official or team results.
Source: Wiz Research's blog post "LiteLLM Compromised, Steals Credentials" (published October 21, 2026, by Benjamin Read and Rami McCarthy); methodology based on the team's first-hand forensics of the PyPI package, Docker images, the Berri-AI fork repo, and post-poisoning AWS calls. Attack timeline and IOCs follow the version published by Wiz; LiteLLM's official incident statement released later that evening corroborates the root cause described here.