> [!IMPORTANT]
> **Status 2026-10-21 17:13Z:** PyPI has removed `1.107.0` ✅. **T…he Docker images are yanked:** `latest`, `main-latest` and `main-stable` on `ghcr.io/berriai/litellm{,-database,-non_root}` and `docker.io/litellm/litellm` no longer point to the v1.107.0 stealer image.
> ~~[!IMPORTANT]~~
> ~~**Status 2026-10-21 13:23Z:** PyPI has removed `1.107.0` ✅. **The Docker images are still infected:** `latest`, `main-latest` and `main-stable` on `ghcr.io/berriai/litellm{,-database,-non_root}` and `docker.io/litellm/litellm` still point to the v1.107.0 stealer image. Pin `v1.106.2` by digest. Root cause: the release was built from the lookalike repo `Berri-AI/litellm`. Details and full commit links: [latest update](https://github.com/BerriAI/litellm/issues/47826#issuecomment-6317194658).~~
> **TL;DR: the `litellm==1.107.0` wheels on PyPI contain a credential stealer and a remote-code loader. All 7 wheels are affected. The payload is NOT in the `v1.107.0` git tag; it was injected into the build tree before the wheels were built. Please yank 1.107.0 and rotate the PyPI publishing credentials. Users: pin `litellm==1.106.2` and see the remediation section; don't just run `pip install` in an affected environment.**
## Affected
| File | sha256 |
|---|---|
| `litellm-1.107.0-cp310-abi3-macosx_10_12_x86_64.whl` | `7598727f209d717041db37f7dca271d3a7d328a279890e0e1d55375729aeb86d` |
| `litellm-1.107.0-cp310-abi3-macosx_11_0_arm64.whl` | `0aaf7ba346d41ef2f40390436738b001180d5a1c03aa093f121078a9969d9a1a` |
| `litellm-1.107.0-cp310-abi3-manylinux_2_28_aarch64.whl` | `668169d35b87bf51324080390b1b1c5ab12bd335cfe5f1a99e3689abd5e02ae6` |
| `litellm-1.107.0-cp310-abi3-manylinux_2_28_x86_64.whl` | `462d0c9f67ca522d9e0e4acd245e90b36ce0d5353604a66bb7c43a1ec4a6fcf7` |
| `litellm-1.107.0-cp310-abi3-musllinux_1_2_aarch64.whl` | `c2e32d0ce2548aa662c18bf5001911a79fe5b30cf8357132275add02fdcde054` |
| `litellm-1.107.0-cp310-abi3-musllinux_1_2_x86_64.whl` | `1bbce8caa94f01c0aaa0b7ddae51553a8a32e1ce53d96d44fe583272aff7ad00` |
| `litellm-1.107.0-cp310-abi3-win_amd64.whl` | `12d4ccc5c6f8d35cf4f2cf233b7f3e418e863e657d81ff5f5fc9e210005b9484` |
| `litellm-1.107.0.tar.gz` (no payload files, but has the tampered `pyproject.toml`) | `2befe2a79fb4fbbd9a543b5b40b530c8cffa8771bab22b8fb22b2e4ae3b1f819` |
**Checked and clean:**
- every wheel of 1.103.6, 1.103.7, 1.104.4, 1.104.5, 1.105.2, 1.105.3, 1.106.0, 1.106.1, 1.106.2, 1.107.0rc1 and 1.107.0rc2
- `litellm-proxy-extras` 0.4.108–0.4.110
- `litellm-enterprise` 0.1.69.post2, 0.1.73.post1 and 0.1.76.post1
We did not inspect the v1.107.0 Docker images.
## How it got in
Each 1.107.0 wheel contains three extra files under `litellm-1.107.0.data/purelib/`. pip installs them into **site-packages root**:
```
cook.pth 12 B RECORD sha256=fxkWMucyBwXRVLhSBPGuVGtUOsvX6IYSKbdvUEK5K9s
cook.py 22252 B RECORD sha256=ndCjkm-Wo364bPHuIxDZvpMTnMTr7z754u_pUxOQviU
sitecustomize.py 25509 B RECORD sha256=NL7wT-iKydCq4EdWMLFzhoHRW5TyM6yKpG6s9ZaDBfo
```
The sdist's `pyproject.toml` contains a line that is **not** in the tagged tree (`66c8f5b1a9cefaa7c55b758f86f4ab552f2e859e`):
```diff
[tool.maturin]
manifest-path = "litellm-rust/crates/python-bridge/Cargo.toml"
module-name = "litellm.rust_bridge._native"
python-source = "."
+data = "cook"
python-packages = ["litellm_cli"]
```
maturin 1.9.4 built the wheels around 2026-10-21 11:21Z: the payload files have the same zip timestamps and metadata as the legitimate files. So the build tree was modified between checkout and build, and the zips were not repacked by hand afterwards. PyPI received the upload at 11:39:51–11:40:13Z. ~~That's ~10 minutes **before** the GitHub release was published (11:50:24Z).~~ *(Retracted: that's this project's normal order; see the update.)* We could not find a GitHub Actions workflow that publishes to PyPI. **We don't know how the build environment or publish credential was compromised.** You can see that from your side (whichever CI or machine runs the release build and holds the PyPI token).
## What the payload does
1. **`cook.pth`** contains `import cook`, so `cook.py` runs on **every** start of that interpreter or venv.
2. **`cook.py`** is a zlib+base64-wrapped stealer that calls itself `privcollect`. It runs once in a background thread and doesn't depend on any C2. It collects:
- host and network info (`ss -tulpn`, routes, arp)
- Chromium saved passwords (decrypted), cookies and Web Data; Firefox `logins.json` and `key4.db`
- `~/.ssh/*`, shell, DB and REPL histories
- AWS, Azure, gcloud, kube, docker, gh, rclone and `.netrc` credentials
- `.git-credentials`, `.npmrc`, `.pypirc`, maven, gradle, cargo, gem and composer credentials, `.env*` files, `*.pem`, `*.key` and `*.pfx`
- the k8s service account token, `/run/secrets/*`, gitlab-runner, Jenkins, Vault, Terraform and Packer credentials
- AI tool credentials and configs: Claude, Codex, Gemini, Qwen, Cursor, Windsurf, Kiro, VS Code MCP and Copilot, HF tokens, …
- **the environment variables of every readable process** (`/proc/*/environ`)
- **if `DATABASE_URL` is set, it spawns prisma and dumps `LiteLLM_CredentialsTable` and `LiteLLM_ProxyModelTable`**, i.e. every upstream provider key the proxy stores
- cloud metadata: AWS IMDSv2 role credentials and ECS task credentials (**it validates them with STS `GetCallerIdentity`**), GCP service-account access tokens, Azure IMDS
- GPG private keys, TLS private keys (`/etc/ssl/private`, letsencrypt)
Exfiltration: the data is encrypted with AES-256-CBC, the key is wrapped with RSA-4096-OAEP, and the result is POSTed as a tar.gz to `http://www.litellm.dev/healthcheck`. The traffic can't be decrypted from a network capture.
3. **`sitecustomize.py`** also runs automatically at startup. It forks a detached daemon (`setsid`, stdio→/dev/null, flock `/tmp/remote_code_loader.lock`) and repeats this every hour:
1. read `https://raw.githubusercontent.com/letters9813/pythonclient-test/main/domain.txt`
2. if that file holds a domain, run the same stealer
3. `GET http://<domain>/codepy` and **`exec()`** the response
`domain.txt` has been empty since 2026-10-20 09:15Z, so this stage is dormant for now. The operator can re-arm it with a single commit. On Windows `sitecustomize` can't fork and fails silently, but `cook.py` still runs.
## IOCs
| Type | Value |
|---|---|
| Exfil | `POST http://www.litellm.dev/healthcheck`; `litellm.dev` registered 2026-10-13, Cloudflare NS. **Not** the project's domain (`litellm.ai`) |
| HTTP headers | `X-Token: XWiA8gZNa7NcX2XRoAEb`, `X-SHA256: <sha256 of body>`, `Content-Type: application/octet-stream`, `User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0)` |
| Dead-drop | GitHub user `letters9813` (created 2026-10-13), repo `letters9813/pythonclient-test`, file `domain.txt` |
| Files | `site-packages/cook.pth`, `site-packages/cook.py`, `site-packages/sitecustomize.py` |
| Host markers | `/tmp/.pc_once_72129118c59f5636c0bb` (written **only after a successful exfil POST**), `/tmp/remote_code_loader.lock`, env `PRIVCOLLECT_ACTIVE=1`, temp dirs `/tmp/.pc_sq_*` and `/tmp/.pc_e_*`, an orphaned `python` process with cwd `/` |
| RSA public key | 4096-bit SPKI starting `MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvxRBQMVXDXVskKS47haU…` |
## Remediation for users
**Don't start with `pip install`.** Any Python start in the affected environment runs `cook.pth` and `sitecustomize.py` again, and that includes running pip.
1. From the shell, delete `cook.pth`, `cook.py`, `sitecustomize.py` and any matching `__pycache__/cook*.pyc` and `sitecustomize*.pyc` from **every** affected site-packages.
2. Kill the detached python daemon (it holds `/tmp/remote_code_loader.lock`).
3. Reinstall pinned to `litellm==1.106.2`. Rebuilding images and venvs from scratch is better.
4. **If 1.107.0 was ever installed on a host with outbound internet, assume the exfil succeeded.** If the marker file exists, the exfil is confirmed. If it doesn't, that proves nothing: containers and tmp cleanup remove it.
5. Rotate everything listed above that the host could reach. In particular:
- the instance/task IAM role
- **every provider key stored in the LiteLLM proxy DB**, plus the master and virtual keys
- the `DATABASE_URL` password
- any secret that was in the environment of any process on the host
6. Check CloudTrail for `GetCallerIdentity` from the instance role around install time, then for use of the role's credentials from outside your infrastructure.
## Asks for maintainers
- Yank 1.107.0 (all files) and ask PyPI to quarantine it.
- Revoke and rotate the PyPI publishing credential, and audit the release build environment for where `data = "cook"` and the `cook/` directory came from. Treat the next release as untrusted until that's done.
- Consider moving to PyPI Trusted Publishing with attestations. litellm has never published attestations, so users currently can't tell a tampered build from a legitimate one.
---
*Reported by the Upwind security research team. We recovered the full payload by static decoding only; nothing was executed. Happy to share the decoded sample privately with maintainers or PyPI.*