
This article is a companion to the video, not a replacement for it, and the video is the starting point for everything below.
In the video: an 11-minute triage walkthrough covers the exact exposure window, who is and is not affected, how the release pipeline was hijacked, what the payload and its second stage do, a live homelab check to copy, the clean rebuild plus pin procedure, the rotation order that matters, and hardening so the next incident does not land the same way. The demo terminal shows real commands with real output on a clean machine.
Added from the sources: every date, file name, version number, and procedure below was checked against the Wiz compromise analysis, the SecurityWeek supply-chain report, the Konfirmity advisory, the LiteLLM security feed, the PyPI litellm history, and the upstream incident thread. A Prag research folder with per-claim source tracing exists for this video and grounds the detail. This companion stages no infected package anywhere, so treat the remediation as sourced procedure, untested here against a live compromise.
Related gateway reading: Install LiteLLM 1.106.2 on Ubuntu 24.04, which pins the safe release this guide rebuilds onto, and Self-Host One AI Gateway for Every Model.
In the video: the poisoned 1.107.0 wheels went up on PyPI at 11:39 UTC on October 21st and PyPI quarantined them around 13:20, a roughly two-to-three-hour window with about 49,000 downloads. The Docker side is wider: the tags v1.107.0, latest, main-latest, and main-stable carried the same payload from late morning until they were pulled or repointed that afternoon around 2pm. The last release reported clean is 1.106.2, and every earlier version is reported safe.

Added from the sources: the Wiz analysis confirms the 11:39 UTC upload, the 13:20 UTC quarantine, and the roughly 49,000 downloads, and it names the four affected Docker tags with removal around 13:53 UTC. The Konfirmity advisory and the SecurityWeek report corroborate the window and note that customers pulling from the private enterprise registry were not affected. There is no CVE here because this is a supply-chain compromise of build artifacts, not an exploitable code bug.
In the video: attackers obtained GitHub CLI OAuth tokens belonging to three engineers, likely leaked when an AI coding assistant embedded them in response bodies that got logged to an internal LiteLLM deployment exposed to the public internet. With those tokens they disabled branch protections, merged a change repointing the releaser at a different source repository, and ran a compromised workflow aimed at a lookalike repo with a hyphen in the name instead of the real project, which built, signed, and published the poisoned artifacts.
Added from the sources: the Wiz analysis attributes exactly this path, quoting the project maintainers, and the SecurityWeek report independently corroborates the token theft and lookalike-repository build. Each 1.107.0 wheel drops three files into the root of site-packages: a one-line cook.pth holding import cook, a roughly 22KB cook.py stealer, and a roughly 25KB sitecustomize.py loader. Because Python executes import lines in .pth files at every interpreter start, the stealer runs whenever Python starts in that environment, even for pip itself and even for code that never imports LiteLLM. The Konfirmity advisory documents the same three-file technique and calls out its dual-hook form.
.env files, and the proxy database itself via a direct query capped at 500 credential rows.In the video: the live check runs pip show litellm for the version, lists Docker image digests against the pinned value, hunts the top level of every site-packages for the payload files with hash comparison for any October-dated sitecustomize.py since legitimate ones exist, looks for the /tmp marker and loader lock files plus any Python process holding the lock, and searches proxy and DNS logs for the lookalike exfil domain and the dead-drop fetch.

Added from the sources: checking first matches the project's own guidance, and the PyPI history plus the security feed confirm 1.106.2 as the pin to rebuild onto while normal releases stay paused. Containment comes before poking: do not start Python or pip inside a suspect environment because starting them reruns the payload. Kill any process holding the loader lock, then delete the payload files plus their cached bytecode from every affected site-packages. The real fix is a rebuild, not a patch: a fresh virtual environment with litellm==1.106.2, or a container rebuilt from a clean base image pulling v1.106.2 pinned by digest, never by floating tag. Verify the pin in the lock file and compose file and confirm the payload files are gone from the fresh environment before it ever sees a secret.

Added from the sources: removing the package does not un-steal anything, so rotation is mandatory wherever 1.107.0 ever ran, and the order matters: revoke and reissue every upstream provider key stored in the proxy at each provider's own console first, since rotating only the gateway master key does nothing if the attacker already holds the upstream keys. Then the database password, the master and virtual keys, cloud keys and instance roles, SSH keys, CI and registry tokens, Kubernetes service account tokens, anything in environment files, and saved browser sessions on that host. Check provider and cloud logs for use of the old keys, because stolen keys get tested within hours.
.pth files containing import lines and any sitecustomize.py in site-packages after installs.