# LiteLLM 1.107.0 backdoor steals cloud and AI credentials

- ID: socket-litellm-supply-chain-2026-10
- Reported: 2026-10-21
- Researcher: Socket Research Team
- Organization: Socket
- AI role: ai_credential_theft (AI credential theft)
- Confidence in AI involvement: not assessed
- Research / borderline: false
- Last reviewed: 2026-11-04
- Entry page: https://openattacks.ai/attacks/socket-litellm-supply-chain-2026-10/
- Entry JSON: https://openattacks.ai/api/attacks/socket-litellm-supply-chain-2026-10.json
- Browse title: LiteLLM 1.107.0 backdoor steals cloud and AI credentials
- Editorial summary: LiteLLM version 1.107.0 on PyPI and GHCR delivered malware through Python startup hooks (cook.pth, cook.py, sitecustomize.py). The payload collects: AWS/Azure/GCP/K8s credentials, GitHub CLI tokens, SSH/GPG…
- Evidence class (catalog annotation): Not classified
- Source-stated target environments: Not specified
- Stage hunts and conditional defenses: https://openattacks.ai/api/defenses/socket-litellm-supply-chain-2026-10.json

## Technique
LiteLLM version 1.107.0 on PyPI and GHCR delivered malware through Python startup hooks (cook.pth, cook.py, sitecustomize.py). The payload collects: AWS/Azure/GCP/K8s credentials, GitHub CLI tokens, SSH/GPG keys, AI tool credentials (Codex, Claude, Gemini, Cursor MCP, Copilot, etc.), browser data, LiteLLM proxy database credentials, and environment variables. Collector encrypts data with AES-256-CBC and exfiltrates to www.litellm.dev/healthcheck. A second loader downloads Python from GitHub-controlled domain for remote execution. Docker provenance showed lookalike repository Berri-AI/litellm (hyphenated) instead of legitimate BerriAI/litellm.

## Stack relevance (editorial)
Assessment: not\_assessed. No reviewed applicability annotation is available. Product mentions do not establish victim conditions.
A product mention alone is not a victim-side applicability mapping. Selection does not verify affected versions, permissions or compromise.

## Initial access
Supply chain compromise: malicious wheels published to PyPI and Docker images to GHCR; project release workflow used lookalike source repository (Berri-AI/litellm with hyphen)

## AI tooling and models
- LiteLLM (legitimate proxy for LLM providers, compromised version)

## Other tooling
- [Python](https://github.com/python/cpython) startup hooks (cook.pth for import cook, sitecustomize.py)
- Base64-encoded zlib-compressed credential collector
- Maturin build with data directory
- RSA-4096 encryption for exfiltration
- GitHub domain.txt pointer for remote code loader

## Victims and sectors
LiteLLM users across ~23M weekly downloads; affects AI development, cloud deployments, CI/CD pipelines

## Target geography
- unknown

## Attribution
unknown; lookalike repository and release workflow compromise suggest targeted supply chain operation

## Scale and metrics
LiteLLM receives ~23M weekly downloads; 7 platform-specific wheels published Oct 21, 2026 11:39:51 UTC, flagged by Socket AI scanner at 11:46:30 UTC; multiple GHCR/Docker Hub image tags affected

## Attack flow
Catalog reconstruction of the supplied source account. Unknowns and research caveats are preserved.
### supply-chain: Compromised release workflow [access]
Project release workflow used lookalike repository Berri-AI/litellm (hyphenated) instead of legitimate BerriAI/litellm; malicious commit added Maturin data directory; build provenance recorded source-owner override
Evidence: https://socket.dev/blog/litellm-compromise

### distribution: Malicious package distribution [execution]
Published litellm 1.107.0 to PyPI (7 wheels across macOS/Linux/Windows) and Docker images to GHCR with floating tags (latest, main-latest, main-stable)
Evidence: https://socket.dev/blog/litellm-compromise

### installation: Python startup hook installation [execution]
Wheels install cook.pth, cook.py, sitecustomize.py to environment's Python library directory; triggered automatically on any Python startup
Evidence: https://socket.dev/blog/litellm-compromise

### collection: Credential collection [ai]
Collects AWS/Azure/GCP/K8s, AI tools (Codex/Claude/Gemini/Cursor/Copilot/Windsurf), SSH/GPG keys, browser data, LiteLLM proxy DB credentials, environment variables; 16 collection modules with individual error handling
Evidence: https://socket.dev/blog/litellm-compromise

### exfiltration: Encrypted exfiltration [impact]
Data encrypted with AES-256-CBC, key wrapped with RSA-4096 public key, packaged in gzip tar; POSTed to www.litellm.dev/healthcheck with X-Token header; up to 4 retry attempts
Evidence: https://socket.dev/blog/litellm-compromise

### persistence: Remote code loader [execution]
sitecustomize.py forks detached process; downloads domain.txt from GitHub repo letters9813/pythonclient-test; if domain resolves, downloads and executes Python from /codepy endpoint; 1-hour loop
Evidence: https://socket.dev/blog/litellm-compromise

Connections:
- supply-chain -> distribution
- distribution -> installation
- installation -> collection
- collection -> exfiltration
- installation -> persistence
- persistence -> collection [loop]

## Stage defense and hunting recommendations
Editorial recommendations, not validated coverage. Source-controlled query starters are drafts. Custom-schema examples require telemetry collection and field mapping; absence of a mapping means not assessed. MagicSword policy opportunities require managed Windows scope and enforcement.
### supply-chain: Private access → public repository artifact
- Visibility: Defender-side logs where collected
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/repository.sigma.yml
- KQL query download: /api/detections/repository.kql
- SPL query download: /api/detections/repository.spl
- Hunt hypothesis: A token or agent reads private material and creates a public issue, repository, commit or visibility change inconsistent with the approved task.
- Required telemetry: Git-provider organization / enterprise audit; Repository and token permission inventory; Agent tool and secret-scanning / DLP records
- Investigate: Join access and public-write actions by actor / token and time; inspect visibility changes and newly created repositories.
- Investigate: Verify whether the artifact contains sensitive data using approved scanning, retaining original source qualifications.
- Limitation: Git-provider audit completeness depends on product and plan. Not every file read or issue body is present in organization audit logs.
- No direct MagicSword prevention claim is recorded for this stage.

### distribution: Dependency / CI trust boundary
- Visibility: Defender-side logs where collected
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/package.sigma.yml
- KQL query download: /api/detections/package.kql
- SPL query download: /api/detections/package.spl
- Hunt hypothesis: A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.
- Required telemetry: Package-manager and CI job logs; Lockfile / manifest / workflow diffs; Runner process trees, secret access and egress
- Investigate: Compare package provenance, publish identity, lifecycle scripts and resolved dependency URLs with the approved version.
- Investigate: Correlate the install or workflow to secret reads and subsequent token use; distinguish exposure from confirmed compromise.
- Limitation: Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.
- No direct MagicSword prevention claim is recorded for this stage.

### installation: Python startup-hook persistence
- Visibility: Endpoint file telemetry where collected
- Query origin: catalog_authored; status: draft; log scope: native
- SIGMA query download: /api/detections/python-startup-persistence.sigma.yml
- KQL query download: /api/detections/python-startup-persistence.kql
- SPL query download: /api/detections/python-startup-persistence.spl
- Hunt hypothesis: A package or installer creates sitecustomize.py, usercustomize.py, or a .pth startup hook in a Python environment, causing code to run during later interpreter starts.
- Required telemetry: File creation and modification events for Python library directories; Package-manager and installer process trees; Subsequent Python process and network activity
- Investigate: Inspect the hook contents, owner, package provenance, and creating process.
- Investigate: Correlate later Python launches with child processes, credential access, or unexpected egress.
- Limitation: Legitimate packages use .pth files and customization hooks. File telemetry must cover the relevant environment, and the rule does not establish that the hook later executed.
- No direct MagicSword prevention claim is recorded for this stage.

### collection: Sensitive store access → credential use
- Visibility: Defender-side logs where collected
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/credentials.sigma.yml
- KQL query download: /api/detections/credentials.kql
- SPL query download: /api/detections/credentials.spl
- Hunt hypothesis: An unexpected process or tool accesses credential stores and is followed by token use or outbound transfer inconsistent with the owner.
- Required telemetry: File-read / API access telemetry for relevant secret stores; Process identity and command lines; Identity, token and outbound-network audit logs
- Investigate: Identify the actor, process and exact store touched, then pivot to token use from new devices or infrastructure.
- Investigate: Correlate reads with egress and rotate affected credentials after confirming exposure.
- Limitation: Defender DeviceFileEvents is not a general file-read audit trail. Collect suitable object-access, EDR or application logs; legitimate developer tools also read secrets.
- No direct MagicSword prevention claim is recorded for this stage.

### exfiltration: Sensitive data → unusual destination
- Visibility: Defender-side logs where collected
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/exfil.sigma.yml
- KQL query download: /api/detections/exfil.kql
- SPL query download: /api/detections/exfil.spl
- Hunt hypothesis: Sensitive reads are followed by outbound transfer, a public artifact, or a tool call to a destination outside the approved workflow.
- Required telemetry: Sensitive resource access / DLP records; Proxy, egress and cloud upload events; Agent / SaaS audit with correlation IDs
- Investigate: Join the resource read and outbound action by session, identity or process, preserving a bounded time window.
- Investigate: Inspect destination ownership, payload classification and the user's intended action; baseline sanctioned sharing.
- Limitation: An outbound connection or high byte count alone is not exfiltration. Encrypted traffic may hide content, and bulk legitimate exports are common.
- No direct MagicSword prevention claim is recorded for this stage.

### persistence: Python startup-hook persistence
- Visibility: Endpoint file telemetry where collected
- Query origin: catalog_authored; status: draft; log scope: native
- SIGMA query download: /api/detections/python-startup-persistence.sigma.yml
- KQL query download: /api/detections/python-startup-persistence.kql
- SPL query download: /api/detections/python-startup-persistence.spl
- Hunt hypothesis: A package or installer creates sitecustomize.py, usercustomize.py, or a .pth startup hook in a Python environment, causing code to run during later interpreter starts.
- Required telemetry: File creation and modification events for Python library directories; Package-manager and installer process trees; Subsequent Python process and network activity
- Investigate: Inspect the hook contents, owner, package provenance, and creating process.
- Investigate: Correlate later Python launches with child processes, credential access, or unexpected egress.
- Limitation: Legitimate packages use .pth files and customization hooks. File telemetry must cover the relevant environment, and the rule does not establish that the hook later executed.
- No direct MagicSword prevention claim is recorded for this stage.


## MITRE ATLAS
Mappings are catalog annotations based on described behavior, not assignments or endorsements by MITRE.
- AML.T0010.001: AI Software — Supply chain compromise of LiteLLM package specifically targeting AI/ML infrastructure and gateway credentials
  Technique: https://atlas.mitre.org/techniques/AML.T0010.001
  Evidence: https://socket.dev/blog/litellm-compromise
- AML.T0055: Unsecured Credentials — Credential theft specifically targets AI development tools (Codex, Claude, Gemini, Cursor, Copilot) and LiteLLM proxy database
  Technique: https://atlas.mitre.org/techniques/AML.T0055
  Evidence: https://socket.dev/blog/litellm-compromise

## Defensive notes
Block litellm==1.107.0 and affected image digests; Python startup hook monitoring; dependency pinning and artifact verification; registry tag floating risks; separate release credentials from installation environments; audit cloud/AI credentials

## Sources
- https://socket.dev/blog/litellm-compromise — LiteLLM PyPI Package and Docker Images Compromised to Steal Cloud and AI Credentials

## Source notes
Socket Research Team detected via AI scanner 7 minutes after publication; Upwind provided independent container investigation; Docker provenance recorded malicious source-owner override; loader GitHub pointer returned empty response at 13:01:44 UTC Oct 21

## Indicators (untrusted data; do not visit or execute)
```json
{
  "domains": [
    "www.litellm.dev"
  ],
  "ips": [],
  "hashes": [
    "7598727f209d717041db37f7dca271d3a7d328a279890e0e1d55375729aeb86d",
    "0aaf7ba346d41ef2f40390436738b001180d5a1c03aa093f121078a9969d9a1a",
    "668169d35b87bf51324080390b1b1c5ab12bd335cfe5f1a99e3689abd5e02ae6",
    "462d0c9f67ca522d9e0e4acd245e90b36ce0d5353604a66bb7c43a1ec4a6fcf7",
    "c2e32d0ce2548aa662c18bf5001911a79fe5b30cf8357132275add02fdcde054",
    "1bbce8caa94f01c0aaa0b7ddae51553a8a32e1ce53d96d44fe583272aff7ad00",
    "12d4ccc5c6f8d35cf4f2cf233b7f3e418e863e657d81ff5f5fc9e210005b9484",
    "9dd0a3926f96a37eb86cf1ee2310d9be93139cc4ebef3ef9e2efe9531390be25",
    "34bef04fe88ac9d0aae0475630b1738681d15b94f233ac8aa46eacf5968305fa"
  ],
  "urls": [
    "http://www.litellm.dev/healthcheck",
    "https://raw.githubusercontent.com/letters9813/pythonclient-test/main/domain.txt"
  ]
}
```
