Threat reportSupply ChainTL-2026-7415
LiteLLM supply chain compromise: malicious litellm 1.107.0 on PyPI, GHCR and Docker Hub delivers credential stealer and RAT
On 2026-10-21 an attacker used stolen developer GitHub CLI credentials to run LiteLLM's private release workflow against the lookalike fork Berri-AI/litellm. They published litellm 1.107.0 to PyPI and Docker images to GHCR and Docker Hub. The artifacts add cook.pth, cook.py and sitecustomize.py to site-packages, which steal cloud, developer and AI-tool credentials on every Python start and run an hourly dead-drop-driven remote code loader.
Key facts
| Identifiers | TL-2026-7415 |
|---|---|
| Also known as | LiteLLM 1.107.0 compromise, privcollect |
| Severity | CRITICAL |
| Affected products | BerriAI litellm (PyPI package); BerriAI LiteLLM container images (ghcr.io/berriai/litellm, litellm-database, litellm-non_root, docker.io/litellm/litellm) |
| Weaknesses (CWE) | CWE-506, CWE-532 |
| Malware | Python, privcollect |
| MITRE ATT&CK techniques | T1005 Data from Local System, T1027.013 Encrypted/Encoded File, T1036.005 Match Legitimate Resource Name or Location, T1059.006 Python, T1078 Valid Accounts, T1082 System Information Discovery, T1102.001 Dead Drop Resolver, T1195.002 Compromise Software Supply Chain, T1528 Steal Application Access Token, T1546.018 Python Startup Hooks, T1552.001 Credentials In Files, T1552.004 Private Keys and 5 more in the attack flow |
| Motivation | UNKNOWN |
| Target sectors | technology, cloud, software development, artificial intelligence |
| Target regions | Global |
| Detection rules | 9 (1 shown free) |
| Sources | 10 cited sources |
Detection coverage
As of 2026-12-03, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-7415 across Splunk SPL, Microsoft KQL and Sigma, covering 27 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.
Free detection: LiteLLM privcollect Exfiltration, GitHub Dead-Drop Poll and /codepy Loader Fetch over HTTP (Zeek)
Detects network behaviour of the litellm 1.107.0 compromise (TL-2026-7415): HTTP to litellm.dev / www.litellm.dev (attacker-registered 2026-10-13), the plain-HTTP POST to /healthcheck with a spoofed MSIE 7.0 User-Agent carrying encrypted credential archives, the hourly dead-drop poll of raw.githubusercontent.com/letters9813/pythonclient-test/main/domain.txt used by sitecustomize.py to resolve its C2 host, and a request to /codepy whose response the loader exec()s without verification.
- Languages: Splunk SPL, Microsoft KQL, Sigma
- ATT&CK: T1041, T1102.001, T1105, T1583.001
- Data sources: zeek_http, network_proxy, defender_network_events
- Severity: critical
- Confidence: high
Splunk SPL
index=network sourcetype="bro:http:json" earliest=-24h (host IN ("litellm.dev","www.litellm.dev") OR (host="raw.githubusercontent.com" uri="/letters9813/pythonclient-test/*") OR (method=POST uri="/healthcheck" user_agent="*MSIE 7.0*") OR uri="/codepy")
```exfil domain, GitHub dead drop, healthcheck POST, codepy loader fetch```
| eval indicator=case(like(host,"%litellm.dev"),"exfil_domain_litellm.dev",like(uri,"/letters9813/%"),"github_dead_drop_poll",uri="/codepy","remote_code_fetch_codepy",true(),"healthcheck_post_msie7")
| rename "id.orig_h" as src_ip "id.resp_h" as dest_ip
| stats count min(_time) as first_seen max(_time) as last_seen values(host) as hosts values(uri) as uris values(user_agent) as user_agents values(dest_ip) as dest_ips by src_ip indicator
| convert ctime(first_seen) ctime(last_seen)Microsoft KQL
let exfilDomains = dynamic(["litellm.dev", "www.litellm.dev"]);
let iocIps = dynamic(["69.48.229.143", "199.91.221.39"]);
DeviceNetworkEvents
| where Timestamp > ago(24h)
| where RemoteUrl has_any (exfilDomains)
or RemoteUrl has "raw.githubusercontent.com/letters9813/pythonclient-test"
or RemoteUrl endswith "/codepy"
or RemoteIP in (iocIps)
| extend Indicator = case(RemoteUrl has "litellm.dev", "exfil_domain_litellm.dev", RemoteUrl has "letters9813", "github_dead_drop_poll", RemoteUrl endswith "/codepy", "remote_code_fetch_codepy", "known_attacker_ip")
| project Timestamp, DeviceName, Indicator, RemoteUrl, RemoteIP, RemotePort, InitiatingProcessFileName, InitiatingProcessCommandLine, InitiatingProcessAccountNameSigma
title: LiteLLM privcollect Exfiltration, GitHub Dead Drop and codepy Loader Fetch via Proxy
id: 8e4a6b30-1d7f-4c29-b5a3-7f0e92c8d303
status: experimental
description: Detects web proxy requests to the attacker-controlled litellm.dev exfiltration domain, the plain-HTTP /healthcheck POST using a spoofed MSIE 7.0 User-Agent, polling of the letters9813/pythonclient-test GitHub dead drop, and requests to /codepy, all associated with the litellm 1.107.0 compromise (TL-2026-7415).
references:
- https://securitylabs.datadoghq.com/articles/litellm-compromised-pypi-docker/
- https://www.stepsecurity.io/blog/litellm-1-107-0-compromised-pypi-backdoored-wheels-credential-stealer
author: Threadlinqs Team
date: 2026-12-03
tags:
- attack.command-and-control
- attack.t1102.001
- attack.t1105
- attack.exfiltration
- attack.t1041
- attack.resource-development
- attack.t1583.001
logsource:
category: proxy
detection:
selection_exfil_apex:
cs-host: 'litellm.dev'
selection_exfil_sub:
cs-host|endswith: '.litellm.dev'
selection_healthcheck:
cs-method: 'POST'
c-uri|endswith: '/healthcheck'
cs-user-agent|contains: 'MSIE 7.0'
selection_deaddrop:
cs-host: 'raw.githubusercontent.com'
c-uri|contains: '/letters9813/pythonclient-test/'
selection_codepy:
c-uri|endswith: '/codepy'
condition: 1 of selection_*
falsepositives:
- Penetration testers or researchers replaying the published indicators
- A legitimate internal service that happens to expose a /codepy path
level: critical
Known false positives:
- Researchers or red teams replaying the published litellm.dev indicators
- An internal web application that legitimately serves a /codepy path
Tuning notes: Adjust index and sourcetype to your Zeek or proxy data (for example pan:threat or bluecoat:proxysg:access:syslog). The /codepy branch is the weakest and may be scoped to egress from Python hosts. The GitHub dead-drop repo was removed and held only test values, so a hit still indicates the loader ran. Do not block all of raw.githubusercontent.com, only the specific path.
- LiteLLM 1.107.0 Malicious Package, Image Digest or Lookalike Berri-AI Repo Referenced in Process Command Line · unlock with TL Creds
- Known-Malicious litellm 1.107.0 Wheel, Sdist or privcollect File Hash Observed on Disk · unlock with TL Creds
- Python or pip Process Probing Cloud Metadata and Connecting to [indicator] Exfiltration Infrastructure · unlock with TL Creds
- GitHub Release Workflow Tampering: Lookalike Berri-AI Repo, Branch Protection Override or Workflow Run Deletion · unlock with TL Creds
- Python Startup Hook (sitecustomize.py / usercustomize.py / cook.pth) Dropped into Third-Party site-packages · unlock with TL Creds
- DNS Resolution of LiteLLM privcollect Exfiltration Domain [indicator] · unlock with TL Creds
- LiteLLM 1.107.0 privcollect Startup-Hook Artifacts Written to site-packages or /tmp (Linux/macOS) · unlock with TL Creds
- Stolen AWS Instance-Role Credentials Used for Recon from Attacker or External IPs (LiteLLM privcollect LLMjacking) · unlock with TL Creds
Indicators of compromise
As of 2026-12-03, Threadlinqs Intelligence tracks 27 indicators of compromise for TL-2026-7415.
Sample indicators (3 of 27)
- IP address:
69.48.229[.]143 - Domain:
litellm[.]dev - URL:
hxxps://github[.]com/Berri-AI/litellm
Defanged, TLP:CLEAR. Full set of 27 indicators: unlock with TL Creds.
Technical analysis
On 2026-10-21 malicious litellm==1.107.0 (seven wheels) was uploaded to PyPI at about 11:39 UTC. Docker images tagged v1.107.0, latest, main-latest and main-stable were published to GHCR and Docker Hub at about 11:46 UTC from the same build. The official v1.107.0 source tag on GitHub does not contain the malicious content. The payload is injected at build time: a commit added data = "cook" under [tool.maturin] in pyproject.toml (packaging a cook/ directory that exists only in the compromised build environment), and a later commit added COPY cook ./cook to the Dockerfiles. A review of the tagged source alone would therefore miss it. LiteLLM application code was not modified.
According to LiteLLM's incident post, a privileged developer credential was used at 10:08 UTC to override branch protection and commit a change to the private release workflow. A staging run then executed against the attacker-controlled lookalike repository Berri-AI/litellm (one hyphen different from BerriAI/litellm) at commit 20535d8fa11f786a6c24df7488a0e449ed5f09ad. A second developer credential approved the production gate at 11:11 UTC. A third credential was used at about 11:53 UTC to delete workflow run records. The artifacts were published through normal channels with build provenance recording Berri-AI as the source owner. Datadog attributes the access to stolen GitHub CLI OAuth tokens from three engineers; one token belonged to a GitHub organization owner. How the tokens were first obtained is not established. LiteLLM reports an unexpected user account on an internal, internet-exposed LiteLLM deployment and suspects the tokens were taken from its logs, possibly through a recently patched vulnerability (unconfirmed). StepSecurity reports a different earlier chain: a master key for an internal agent platform committed to a public repo on 2026-05-27 and never revoked returned an organization owner's CLI token on 2026-10-10, followed by malicious ci-tmp-* workflows exfiltrating CI secrets to webhook.site. These accounts have not been reconciled. LiteLLM also believes the private half of its previous cosign key was exposed and rotated it on 2026-10-23.
The wheels install three files into site-packages. cook.pth (12 bytes, 'import cook') runs cook.py at every Python or pip start, with no import of litellm needed. cook.py decodes a roughly 61 KB Base64+zlib collector (tool tag 'privcollect') that runs in a daemon thread, sets PRIVCOLLECT_ACTIVE=1, and runs 16 collection modules. These cover AWS/Azure/GCP credentials and instance metadata, Kubernetes, Docker, Vault, Terraform, SSH/GPG/TLS keys, Git/npm/PyPI/.netrc/.env secrets, browser passwords and cookies, shell history, /proc/<pid>/environ for all readable processes, and AI-tool credentials (Claude, Codex, Gemini, Cursor, Copilot and others). If DATABASE_URL is set it queries LiteLLM_CredentialsTable and LiteLLM_ProxyModelTable for upstream provider keys. AWS credentials are validated with STS GetCallerIdentity. Results are packed into a tar.gz (hdr.json, data.bin, key.bin), encrypted with a random AES-256-CBC key wrapped under an embedded RSA-4096 public key (OAEP-SHA256), and POSTed over plain HTTP to http://www.litellm.dev/healthcheck with an X-Token header, an X-SHA256 body hash and a spoofed MSIE 7.0 User-Agent. litellm.dev was registered on 2026-10-13. A marker /tmp/.pc_once_72129118c59f5636c0bb is written only after an HTTP 200, so the stealer retries on every Python start until upload succeeds.
sitecustomize.py implements the RAT/loader. On Linux and macOS it takes the lock /tmp/remote_code_loader.lock, forks a detached daemon (setsid, cwd /, streams to /dev/null) and about every 3,600 seconds reads a hostname from the GitHub dead drop raw.githubusercontent.com/letters9813/pythonclient-test/main/domain.txt. It then downloads Python from http://<host>/codepy and exec()s it with no signature or hash check. The dead drop held only test values (localhost:18909, test.test.com:18909) and was empty at 13:01 UTC, and no second-stage payload has been observed. The GitHub account was removed. On Windows the loader fails silently (no fcntl/os.fork) but the stealer still runs. StepSecurity reports that stolen AWS instance-role credentials were later used from 168.100.8.57 and 165.227.201.8 for GetCallerIdentity, bedrock:ListFoundationModels and CloudTrail reconnaissance (2026-10-21 16:20-17:01 UTC), consistent with LLMjacking.
Exposure windows: PyPI wheels live 11:39:51-13:23 UTC (Datadog reports PyPI quarantine at 13:20); GHCR tags until about 13:51 UTC; Docker Hub tags until about 14:20 UTC (Datadog reports Docker images removed at 13:53). Removing the litellm package directory does not remove the dropped files, and running python or pip re-triggers the malware. No actor is named. Datadog states no connection to the earlier litellm 1.82.7/1.82.8 incident (March 2026, attributed to TeamPCP via a compromised Trivy action) has been established, and the delivery method, infrastructure and tooling differ.
MITRE ATT&CK techniques by tactic:
Collection
Defense Evasion
T1027.013 Encrypted/Encoded File; T1036.005 Match Legitimate Resource Name or Location
Execution
Initial Access
T1078 Valid Accounts; T1195.002 Compromise Software Supply Chain
Discovery
T1082 System Information Discovery; T1580 Cloud Infrastructure Discovery
Command and Control
Credential Access
T1528 Steal Application Access Token; T1552.001 Credentials In Files; T1552.004 Private Keys; T1552.005 Cloud Instance Metadata API; T1555.003 Credentials from Web Browsers
Persistence
T1546.018 Python Startup Hooks
Resource Development
defense-impairment
Remediation
Patches
- Pin litellm==1.106.2 (last safe version named by Datadog); StepSecurity also lists clean releases 1.106.4 and backports 1.105.5, 1.104.7 and 1.103.9
- Rebuild images from clean releases pinned by digest; clean images from v1.106.3 onward use the new cosign key
Immediate actions
- Do not run python or pip in an affected environment first; every interpreter start re-triggers the hooks. Inspect with find, sha256sum and ps instead
- Kill the detached Python process holding /tmp/remote_code_loader.lock
- Delete cook.pth, cook.py, sitecustomize.py and matching __pycache__ .pyc files from every affected site-packages directory, or rebuild the virtualenv or container from a clean base
- Assume exfiltration succeeded on any host with outbound access that ran litellm 1.107.0; a missing /tmp/.pc_once_72129118c59f5636c0bb marker does not prove otherwise
- From a clean machine, rotate every reachable credential: cloud keys and instance/task role sessions, LiteLLM proxy provider keys, master/virtual keys, DATABASE_URL password, SSH/GPG/TLS keys, Git/npm/PyPI/registry tokens, Kubernetes and Vault tokens, CI secrets, AI-tool sessions, and secrets in process environments or .env files
- Block www.litellm.dev and litellm.dev at DNS and egress; hunt for the /healthcheck POST, the letters9813/pythonclient-test raw.githubusercontent.com path and any /codepy request. Scope blocks to the specific GitHub path, not all of raw.githubusercontent.com
- Review CloudTrail for GetCallerIdentity, bedrock:ListFoundationModels and use of instance-role credentials from outside your infrastructure after install time
Workarounds
- If the site-packages files cannot be removed immediately, isolate the host from the network, preserve evidence, then rebuild
- Block egress to www.litellm.dev and to the dead-drop path until hosts are rebuilt
Longer-term hardening
- Treat developer CLI tokens (GitHub CLI OAuth) as high-value secrets; keep them out of logs and response bodies
- Restrict release workflows to approved repository owners and reviewed commits so build provenance can be trusted; verify provenance names the expected owner (BerriAI, not Berri-AI)
- Use hash-pinned lockfiles and digest-pinned container images; block litellm==1.107.0 in package proxies and purge caches and mirrors
- Alert on new .pth files with executable lines and on new sitecustomize.py in third-party wheels; review [tool.maturin] and [tool.setuptools] build configuration as code
- Compare published distributions with the intended source, including wheel data directories and startup files
- Separate release credentials from dependency installation and testing; apply least-privilege and time-boxed release permissions
- Verify image signatures against the rotated cosign key (cosign.pub SHA-256 e3fe3e08c44b16407fe0b37c43b4f8b603b3a0f4ee74c29e647bc022d762c2c0); LiteLLM moved to keyless cosign signing from v1.111.0-dev.3
Affected and fixed versions
- BerriAI — litellm (PyPI package)
Vulnerable versions: 1.107.0
Fixed in: 1.106.2 (last safe); 1.106.4 - BerriAI — LiteLLM container images (ghcr.io/berriai/litellm, litellm-database, litellm-non_root, docker.io/litellm/litellm)
Vulnerable versions: v1.107.0; latest; main-latest; main-stable (pulled 2026-10-21, index sha256:1bbcb1443bc962e45f5aad53fe3d2c30600e0379715fb6c664cdd3ac126c339e)
Fixed in: v1.106.2 or later clean releases pinned by digest
Timeline
- Per StepSecurity, a master key for an internal agent platform was committed to a public repository and never revoked; it later returned an organization owner's CLI token.
- Per StepSecurity, the leaked key returned a GitHub organization owner's CLI token and malicious ci-tmp-* workflows exfiltrated CI secrets to webhook.site; a second round of private-repo secret theft followed on 2026-10-12.
- Exfiltration domain [domain withheld] was registered (StepSecurity).
- GitHub dead-drop repo letters9813/pythonclient-test was created and tested between 2026-10-18 and 2026-10-20 (StepSecurity); it held only test values.
- 16:20-17:01 UTC stolen AWS instance-role credentials were used from [IP address withheld] and [IP address withheld] for GetCallerIdentity, bedrock:ListFoundationModels and CloudTrail reconnaissance (StepSecurity).
- PyPI quarantined or removed 1.107.0 at about 13:20-13:23 UTC; GHCR tags were unavailable by 13:51 UTC and Docker Hub tags were removed or repointed by 14:20 UTC; the dead-drop account was removed.
- Security vendors flagged the release within minutes (Socket alerts at 11:46 UTC); the compromise was reported at about 12:06 UTC and Datadog Security Labs published its analysis.
- 11:53-11:54 UTC a third developer credential was used to delete production and staging workflow run records; the unauthorized workflow revision was removed by 12:24 UTC.
- 11:11 UTC a second developer credential approved the production gate; 11:39-11:40 UTC seven malicious litellm 1.107.0 wheels were uploaded to PyPI, and at 11:46 UTC the malicious Docker images were published to GHCR and Docker Hub.
- 08:56-10:46 UTC attacker commits were pushed. At 10:08 UTC a privileged developer credential overrode branch protection to change the private release workflow, and at 10:46 UTC a staging run started against the lookalike repo Berri-AI/litellm (commit 20535d8f).
- LiteLLM rotated its image signing (cosign) key after concluding the previous private key may have been exposed.
- Clean LiteLLM releases resumed (2026-10-24 to 2026-10-25 per StepSecurity).
Sources cited
- LiteLLM supply chain compromise: What you need to know (Datadog Security Labs) securitylabs.datadoghq.com · Research · 2026-10-21
- LiteLLM v1.107.0 security incident analysis (LiteLLM) docs.litellm.ai · Vendor report · 2026-10-21
- litellm 1.107.0 compromised: PyPI backdoored wheels, credential stealer (StepSecurity) stepsecurity.io · Research
- LiteLLM PyPI Package and Docker Images Compromised to Steal Cloud and AI Credentials (Socket) socket.dev · Research · 2026-10-21
- litellm 1.107.0 compromised: Python startup hooks steal cloud, AI and proxy credentials (Endor Labs) endorlabs.com · Research
- litellm compromised: infostealer and RAT (Aikido) aikido.dev · Research
- How a Poisoned Security Scanner Became the Key to Backdooring LiteLLM (Snyk) - earlier 1.82.7/1.82.8 incident, TeamPCP, March 2026 snyk.io · Research · 2026-03-24
- litellm 1.107.0 compromised (Mend) mend.io · Blog
- litellm release pipeline hacked to distribute info stealer malware (BleepingComputer) BleepingComputer · News · 2026-10-22
- LiteLLM supply chain attack hoovers up passwords and secrets (The Register) The Register · News · 2026-10-21
Further reading
AI-drafted from 10 cited sources; published ; last updated —.