S-SCOTTEK← HomepageNewsGuidesBuyingTeamForumSupportlog in · sign up
local-ai 2026-10-22

Install LiteLLM 1.106.2 on Ubuntu 24.04

Companion guide and video starting point

This article is a companion to the video, not a replacement for it, and the video is the starting point for everything below.

Watch the video

In the video: the presenter pins a safe LiteLLM release on Ubuntu 24.04 after a compromised build hit PyPI, installing 1.106.2 in a virtual environment, proving the install with a version print and an implant file search, and confirming the gateway CLI without starting live traffic.

Added from the sources: dates, exposure windows, implant file names, and remediation steps were checked against the official LiteLLM incident report, the security issue, the PyPI litellm page, and the proxy quickstart. There is no Prag research folder for this video, so everything beyond the transcript comes from those primary sources. Live proxy traffic against a paid provider key is untested here.

Related homelab gateway reading: Self-Host One AI Gateway for Every Model.

What happened on October 21

In the video: on October 21st, LiteLLM 1.107.0 shipped a credential stealer and a backdoor, PyPI pulled it the same day, and 1.106.2 and earlier are clean.

Release card showing the official PyPI page with 1.106.2 as the latest release after 1.107.0 was pulled
Release card showing the official PyPI page with 1.106.2 as the latest release after 1.107.0 was pulled (Still from the walkthrough video.)

Added from the sources: the incident report confirms a malicious litellm==1.107.0 package was live on PyPI for about two hours (11:39 UTC to 13:23 UTC) and states that all previous versions are safe, with the impacted releases pulled. Compromised Docker tags were also repointed to clean artifacts by 14:20 UTC. For now the guidance is to pin to 1.106.2 or any explicit earlier version.

What you need before starting

In the video: you need 64-bit Ubuntu, Python 3.10 or newer, and the venv tooling, with one apt line if your box lacks it.

Added from the sources: the PyPI litellm page lists Python >=3.10, <3.15 as required, and the proxy quickstart confirms LiteLLM 1.84.0 and newer need Python 3.10 or higher. Stock Ubuntu 24.04 ships Python 3.12, which satisfies that floor.

Create an isolated environment and check the slate

In the video: the presenter checks the Python version, creates a virtual environment, calls its pip directly, and asks that pip about litellm. A package-not-found answer means a clean slate.

Added from the sources: checking first matches the incident report's own first step, which uses pip show litellm to see what is installed (incident report).

Install pinned to 1.106.2 with the proxy extra

In the video: the install uses a double-equals pin so pip takes exactly 1.106.2 and refuses anything newer, with the proxy extra shipping the litellm gateway command alongside the SDK. A fresh install pulls a few hundred megabytes, so the presenter waits for the finish line.

Install card showing the pinned proxy-extra install command and its successful finish
Install card showing the pinned proxy-extra install command and its successful finish (Still from the walkthrough video.)

Added from the sources: the proxy quickstart documents the proxy extra as pip install 'litellm[proxy]', and the incident report tells OSS users to pin to 1.106.2 for the time being.

Prove it with a version print and an implant search

In the video: proof comes two ways. The installed version prints as 1.106.2, then a package-file listing is searched for the implant names from the incident report, with no matches and grep exiting 1. That empty result is the proof.

Added from the sources: the implant names below are confirmed by the security issue and the incident report: cook.pth (which runs import cook on every interpreter start), cook.py (the credential stealer), and sitecustomize.py (the remote-code loader daemon). The report adds that finding one confirms exposure, but not finding one does not prove an already-exposed environment is clean.

Confirm the gateway CLI is live

In the video: litellm --help lists real server flags for host, port, workers, and model routing, and litellm --version prints 1.106.2.

Gateway CLI card showing server flags in the help output with the version printing 1.106.2
Gateway CLI card showing server flags in the help output with the version printing 1.106.2 (Still from the walkthrough video.)

Added from the sources: the proxy quickstart documents starting the gateway with commands like litellm --model huggingface/bigcode/starcoder and litellm --config config.yaml --port 4000, which matches the shape of the flags the video shows. Full server-flag output beyond --help is untested here.

If 1.107.0 ever touched the box

In the video: if the box reports 1.107.0, uninstall it and treat every key on that box as burned.

Added from the sources: the incident report remediation says not to start with pip install, because any Python start re-runs cook.pth and sitecustomize.py. From the shell, delete cook.pth, cook.py, sitecustomize.py, and matching __pycache__ files from every affected site-packages, kill the detached daemon holding /tmp/remote_code_loader.lock, then rebuild the venv from scratch pinned to litellm==1.106.2. Then rotate every provider key in the proxy database plus master and virtual keys, the DATABASE_URL password, and any secret in any process environment on the host.

Verdict and next step

Pin 1.106.2 in a throwaway virtual environment, prove the version and the empty implant search, confirm the gateway CLI, and stop before live traffic until your keys are keys you trust. If you juggle providers behind one endpoint afterward, the companion Respan gateway guide covers a self-hosted OpenAI-style front door with keys kept on your machine. Live LiteLLM proxy traffic with real provider keys is untested here.

Sources

Watch the walkthrough

Watch on YouTube