Credential theft and remote code execution through poisoned Python wheels and container images
Executive summary
On 21 October 2026, attackers distributed a malicious release of LiteLLM, a Python library and gateway used to connect applications to AI model providers. The affected release, 1.107.0, reached PyPI and official container registries. Its payload could steal credentials and provide a channel for remote code execution. Developer workstations, build runners, and AI gateways are all relevant to the response. [1], [2]
The business risk extends to the systems those environments can access. A build runner may hold deployment or publishing credentials. An AI gateway may hold keys for several model providers. A developer workstation may hold cloud sessions, source-control tokens, and SSH keys. A single compromised environment can therefore create several separate recovery obligations.
Organizations that installed an affected wheel or executed an affected image should activate incident response. Removing the package or deploying an older version does not invalidate stolen credentials. Contain the environment, establish which identities and secrets it could access, investigate their use, and restore service from verified artifacts.
Senior leaders should request an initial answer to four questions:
- Did an affected artifact enter or execute in our environment? Require package hashes, deployed image digests, and install or execution history.
- What authority did the affected environment hold? Identify reachable cloud roles, provider keys, repositories, databases, and publishing permissions.
- Who owns containment and service recovery? Name the incident lead and the engineering, cloud, identity, and service owners who must act.
- What evidence will establish recovery? Require verified rebuilds, invalidation of exposed credentials and sessions, investigation of downstream use, and closure of material telemetry gaps.
Registry removal limits new distribution. Cached wheels, internal mirrors, CI caches, and derived images can extend exposure beyond the public availability window. Recovery decisions must follow the artifact and its execution history.
Affected artifacts and exposure assessment
The following availability windows are in UTC on 21 October 2026. LiteLLM reports that its private enterprise registry was unaffected; an enterprise subscription or a package named litellm-enterprise alone does not establish use of that registry. [1]
| Distribution | Affected artifacts | Public availability window |
| PyPI | All seven compiled wheels for litellm==1.107.0, covering macOS, Linux, musl Linux, and Windows | 11:39:51 to removal by 13:23 |
| Docker Hub | docker.io/litellm/litellm with v1.107.0, latest, main-latest, or main-stable | 11:46:56 to 14:20 |
| GHCR | Affected tags for berriai/litellm, berriai/litellm-database, and berriai/litellm-non_root | Published from 11:46:56; affected tags were unavailable by 13:51 |
The 1.107.0 source archive contained an altered build configuration but lacked the three payload files found in the wheels. The official GitHub tag also lacked those files. Inspecting that tag or archive cannot establish the contents of a wheel or container installed elsewhere. Quarantine the release and verify the exact artifact consumed. [3]
Use the following evidence classes to decide what to do. These are Tonic response criteria, not claims that every installation led to successful theft.
| Evidence | Interpretation | Response |
| LiteLLM appears in a dependency list, with no affected version or digest | Product relevance established; incident exposure unresolved | Retrieve resolved dependencies and build history |
| A malicious wheel hash exists only in a mirror or download cache | Affected artifact present; installation or execution not established | Preserve, quarantine, block reuse, and trace consumers |
| An affected wheel was installed, or matching startup files are present | Installation established; startup execution must be investigated | Contain and investigate immediately; treat reachable credentials as potentially exposed |
| Python started in the affected environment, or an affected container ran | Execution established | Treat the environment as compromised and investigate downstream access |
| Exfiltration marker or matching outbound upload activity is present | Strong evidence of collector execution and possible completed transfer | Escalate credential and data exposure investigation |
| Inventory predates the incident, versions are missing, or logs are incomplete | Exposure remains unknown | Obtain independent deployment evidence; do not close on a zero-match search |
A successful build can be affected even if no application ever imported LiteLLM. A container being internal, or a service being protected by MFA, does not prevent malicious code already inside its runtime from reading accessible secrets.
Tonic customers can already use the context graph to find likely LiteLLM installations in connected endpoint, cloud, and AppSec data, then connect the evidence to affected environments and available ownership context. This helps teams focus artifact and execution checks on the services that carry the greatest business and credential risk.
Finding likely LiteLLM installations with Tonic
Tonic customers can already use the context graph to identify likely LiteLLM installations across their connected security and IT data. Endpoint software records, cloud findings, and AppSec package evidence can reveal LiteLLM on developer machines, hosts, application artifacts, and workloads, including cases where it appears as a dependency inside another application.
This gives security teams a starting set of environments to investigate, together with the evidence behind each match. Teams can then use the available relationships to understand what those environments support, who owns them, and which ones require attention first.
1. Find the candidate installations. Search for LiteLLM package and container evidence across the connected sources. Include application dependencies and built artifacts as well as explicitly named LiteLLM services.
2. Check the evidence and its age. Inspect the recorded version, available image reference or digest, contributing source, and last observation. Distinguish an endpoint installation, a stored artifact, and a workload recorded as running. Missing version or runtime data should remain visible as a validation task.
3. Prioritize using context. Follow the available links to hosts, workloads, services, and owners. Put production AI gateways, build environments with deployment authority, and privileged developer endpoints at the front of the investigation. Validate their accessible credentials and identities with the relevant owners.
4. Route the specific check. Give the responsible team the matched asset or artifact and its supporting evidence. Ask for the resolved wheel hash or image digest, install or pull history, and execution records needed to determine whether the compromised release ran. Track the resulting containment, credential, and rebuild work to closure.
For example, a LiteLLM package finding linked to a running gateway and a named owning team can become a focused request: verify the artifact deployed after the release, establish which provider keys and cloud identities it could access, and confirm whether incident response is required.
The graph establishes likely installation and investigation scope from the data available. Confirming this compromise requires the affected artifact and its execution history. An older version observed before the release cannot clear a later deployment; gaps in source coverage or freshness remain open questions.
The customer benefit is a shorter path from a new supply-chain alert to a prioritized, owner-assigned investigation with evidence.
Immediate response priorities
First hour
1. Put an incident lead in charge of affected environments. Prioritize gateways holding provider keys, build runners with deployment or publishing access, and developer endpoints with privileged sessions. Set a recovery owner for each business service.
2. Contain execution and outbound access. Isolate suspect hosts or workloads through the existing response controls. Pause pipelines that could reuse affected artifacts. Block the exfiltration domain and the specific loader URL listed below while preserving access needed for response.
3. Preserve evidence before cleanup. Retain original wheel or image hashes, install logs, container task or pod history, process details, EDR events, DNS and proxy logs, CI run records, and cloud audit data. Capture ephemeral workload identity and image information before replacing workloads where feasible.
4. Inspect suspect files with trusted tools. Avoid starting Python, pip, notebooks, or tests inside an affected environment: normal interpreter startup can trigger the implanted hooks. Use an established EDR collection mechanism or inspect a mounted copy from a clean analysis host. [1]
5. Assign owners for credential invalidation. Work from a clean administrative environment. Do not issue replacement credentials into an environment that can still run the collector. Where stolen credentials may be active, coordinate revocation and workload isolation immediately rather than waiting for a full rebuild.
First day
Trace every affected artifact into its consumers, including CI jobs and images built from it. Search both the public distribution period and later activity involving cached copies. For each environment, record the first possible execution, accessible identities and secrets, the owner responsible for each revocation, and the service that depends on them.
Investigate use of those identities after the first possible execution. Review source-control access and workflow changes, package publications, cloud API calls, database access, provider API usage and spend, and new persistence. If the environment could publish or deploy software, establish whether it distributed a downstream artifact. Publishing access is a scoping priority; this advisory does not assert that the October payload automatically propagated through customers’ pipelines.
Rebuild affected virtual environments, runners, and images through a clean build path. Before deleting caches, preserve a representative artifact and its metadata, then quarantine or purge poisoned copies and prevent their resolution through internal proxies. Validate the exact artifacts used by the rebuild.
Technical analysis
Release workflow compromise
LiteLLM’s account describes the use of stolen GitHub CLI credentials belonging to three developers. A privileged credential was used to override branch protections and alter the release workflow, which was redirected to the lookalike repository Berri-AI/litellm. Another credential satisfied a production approval gate. The legitimate release process then produced and distributed the poisoned artifacts. [4]
The vendor believes the credentials were obtained from logs in its own internet-exposed LiteLLM deployment. The initial access mechanism into that deployment remains unconfirmed. That hypothesis should not be converted into attribution to a particular vulnerability or threat actor. [4]
This creates a concrete control requirement: constrain the source repository, source revision, workflow identity, and approval conditions a release job is allowed to use. A signature is useful only alongside an assessment of what was signed and whether the workflow was authorized to build that content.
Injection through Python packaging
Researchers identified the Maturin configuration setting data = “cook”, which caused build-time files to enter the wheel’s .data/purelib/ area. Installing the wheel places those files at the root of the environment’s site-packages, beside the application packages. The three entries were cook.pth, cook.py, and sitecustomize.py. [3]
This placement matters because Python normally processes executable import lines in .pth files during initialization and then attempts to import sitecustomize. The attack uses those supported startup behaviors to reach code before the application begins. The relevant scope is the interpreter environment whose search paths include the implanted files; it is not automatically every Python environment on the host. [5]
The execution sequence is:
Poisoned wheel or image enters the environment
-> startup files are present in site-packages
-> a normal Python startup loads the hooks
-> cook.py attempts credential collection and upload
-> sitecustomize.py attempts to launch a detached loader
-> the loader periodically resolves a server and retrieves code
Credential collection and AI gateway impact
The collector targets developer and runtime secrets, including browser credentials, SSH and private keys, shell histories, cloud credentials, package registry tokens, CI secrets, Kubernetes tokens, and AI development-tool configurations. It attempts cloud metadata access and reads process environments where permissions permit. [6]
It also uses DATABASE_URL to attempt access to LiteLLM_CredentialsTable and LiteLLM_ProxyModelTable. This makes the gateway database part of the exposure assessment, alongside the filesystem and process environment. The presence of a collection module demonstrates intent and capability; successful access to a particular secret still depends on the affected process’s permissions, configuration, and connectivity. [6]
An incident team should turn that target list into an environment-specific credential inventory. Record the secret owner, scope of authority, last possible exposure, revocation mechanism, dependent service, and evidence that replacement material reached only clean workloads. Do not paste credential values into investigation tickets.
Exfiltration and execution markers
JFrog describes encrypted collection data sent to hxxp://www[.]litellm[.]dev/healthcheck. The collector encrypts the data with AES and protects the key with an embedded RSA public key. Plain HTTP therefore does not mean a network capture will reveal the stolen contents. The request uses the static X-Token value listed in the indicator table. [7]
The cook.py collector uses /tmp/.pc_once_72129118c59f5636c0bb as an upload-success marker. A matching marker is a strong investigative lead; its absence cannot exclude execution or theft because ephemeral filesystems, cleanup, and failed transfers can leave no marker. Correlate it with process and network evidence. [11]
Detached remote code loader
The loader attempts to hold /tmp/remote_code_loader.lock, detach through Unix process mechanisms, and poll a GitHub-hosted pointer every hour. It can obtain a server from that pointer, retrieve /codepy, and execute the returned Python code. Aikido reports that GitHub took down the pointer repository. That takedown does not revoke stolen credentials or establish what a loader executed earlier. [2]
The fork-based daemon path does not complete on Windows, while the .pth credential-stealing path remains relevant there. Windows payload-file hashes also differ from the Linux and macOS files because of line endings. Include both hash sets when performing file matching. [7], [4]
Detection and threat hunting
Start with package, image, file, and network evidence, then pivot into identity use. The queries below are experimental hunting content. They require the named telemetry and environment validation before production alerting. They have not been executed against a production Defender tenant. Synthetic checks of matching behavior do not establish real-world detection coverage.
Network and filesystem indicators
| Indicator | Role | Interpretation and handling |
| www[.]litellm[.]dev and hxxp://www[.]litellm[.]dev/healthcheck | Collection upload destination | Block the domain and investigate matching requests; distinguish analyst or sandbox traffic |
| raw[.]githubusercontent[.]com/letters9813/pythonclient-test/main/domain.txt | Loader pointer | Hunt the exact path in proxy telemetry; do not block all GitHub content solely on this indicator |
| X-Token: XWiA8gZNa7NcX2XRoAEb | Upload header | Correlate with destination, method, host, and process where HTTP headers are available |
| cook.pth and cook.py at the root of site-packages | Startup hook and collector | Investigate together and confirm hashes or content |
| sitecustomize.py | Loader filename | Legitimate Python environments can use this name; the filename alone is insufficient |
| /tmp/.pc_once_72129118c59f5636c0bb | Upload-success marker | Preserve and correlate; a missing file does not clear a host |
| /tmp/remote_code_loader.lock | Loader lock | Investigate the process holding it; a leftover file alone does not prove the loader is still running |
Indicators and their roles are documented by Aikido, SafeDep, and Endor Labs. [2], [4], [3] Avoid blocking shared CDN IP addresses as if they uniquely identified the attacker. Retain original timestamps, source attribution, and the role of each indicator in the threat-intelligence platform.
Microsoft Defender file hunt
This query finds known payload hashes when available, suspicious hook-file events, and the specific marker filenames. It searches from the release date onward so later cache-driven installations remain in scope. Extend retention or use archived telemetry where necessary.
let StartTime = datetime(2026-10-21T00:00:00Z);
let PayloadHashes = dynamic([
“7f191632e7320705d154b85204f1ae546b543acbd7e8861229b76f5042b92bdb”,
“9dd0a3926f96a37eb86cf1ee2310d9be93139cc4ebef3ef9e2efe9531390be25”,
“34bef04fe88ac9d0aae0475630b1738681d15b94f233ac8aa46eacf5968305fa”,
“84dc8c82c0a4a4a62552ef826b49fcc86d1a5c4a5d0f2c06665723f93d129d7d”,
“03ac2a8b752605d1d7710979c17ff18b03dd978203ba23ba97fd8ce3d6f897ea”,
“b6122440d0d9cb1eb1ade9933f49214da8c31288de7710c076c2680dfa528465”
]);
DeviceFileEvents
| where Timestamp >= StartTime
| where SHA256 in~ (PayloadHashes)
or (FolderPath contains “site-packages”
and FileName in~ (“cook.pth”, “cook.py”))
or FileName in~ (“.pc_once_72129118c59f5636c0bb”,
“remote_code_loader.lock”)
| project Timestamp, DeviceId, DeviceName, ActionType,
FolderPath, FileName, SHA256,
InitiatingProcessFileName, InitiatingProcessCommandLine
| order by Timestamp asc
DeviceFileEvents is event telemetry, not a complete disk inventory. Microsoft notes that SHA-256 is often unpopulated, so a hash-only hunt can miss relevant events. Validate file-creation coverage on each operating system and inspect existing files separately. A security tool or an analyst collecting samples can produce expected matches. [8]
Microsoft Defender network hunt
This query matches the exfiltration domain with a host boundary and matches the specific GitHub pointer path only when the URL is recorded. It deliberately has no Python process-name filter, because renamed executables and incomplete process fields should not suppress a known destination.
let StartTime = datetime(2026-10-21T00:00:00Z);
DeviceNetworkEvents
| where Timestamp >= StartTime
| extend ObservedUrl = tolower(RemoteUrl)
| where ObservedUrl matches regex
@”^(https?://)?(www\.)?litellm\.dev\.?(:[0-9]+)?([/?#]|$)”
or ObservedUrl matches regex
@”^(https?://)?raw\.githubusercontent\.com/letters9813/pythonclient-test/main/domain\.txt([?#]|$)”
| project Timestamp, DeviceId, DeviceName, ActionType,
RemoteUrl, RemoteIP, RemotePort,
InitiatingProcessFileName, InitiatingProcessCommandLine
| order by Timestamp asc
RemoteUrl may contain only a hostname. In that case this table cannot distinguish the pointer path from legitimate requests to GitHub’s content host; use proxy or other URL-level logs. DNS queries and blocked connections establish attempted contact, not a completed upload. [9]
Hunt for downstream use of credentials
For each affected environment, bind the execution timeline to its identities. In CloudTrail, identify the workload role and access-key IDs associated with it, then review their activity across accounts and regions after the earliest possible execution. GetCallerIdentity is a lead in this case, but it is also common legitimate activity and may be missing from available records. Investigate unusual source networks, new role assumptions, secrets access, policy changes, and resource creation in context. [7]
Apply the same method to model-provider audit records and spend, GitHub or GitLab audit logs, registry publishing, database access, and CI configuration. A reused credential can remain useful after the original host disappears. Prioritize publishing and deployment identities because their misuse could affect systems and consumers beyond the initially compromised environment.
Guidance for a threat intelligence platform
Store file hashes as file indicators, container index and platform-manifest digests with their distinct types, the exact loader URL as a URL indicator, and filenames as contextual artifacts. Keep the altered source archive separate from wheels that contain the payload. Do not promote python, sitecustomize.py, a metadata-service IP address, or GitHub’s domain into a standalone malicious indicator.
Attach source URLs, publication and observation dates, confidence, indicator role, and an analyst review date. Associate matches with an environment, process, image, identity, and owner before escalating their meaning. A hash match in a cache, a blocked DNS lookup, and an executed gateway image require different response decisions.
Remediation and validation
Restore the environment and revoke exposed authority
Build replacement environments on clean infrastructure using a release and artifact explicitly verified against current vendor guidance. The vendor’s incident guidance names 1.106.2 as a temporary pinned release. Being outside this supply-chain incident does not establish that a release is free of unrelated vulnerabilities. [1]
For suspect live systems, preserve the original evidence and contain the loader before attempting repair. Replacing only the litellm application directory can leave the top-level startup hooks behind. If forensic requirements demand selective removal, examine every relevant virtual environment and Python search path, preserve suspicious files and compiled copies, and terminate any surviving loader through the response toolset. A clean rebuild provides a more reliable recovery path when execution occurred.
Revoke or rotate secrets according to the affected environment’s actual access: provider API keys and proxy keys, database credentials, cloud sessions, source-control and registry tokens, SSH keys, Kubernetes credentials, and developer-tool sessions. Track each action to its owner and dependent service. For AWS, replacing an instance or changing a stored key does not by itself invalidate already issued role credentials; use the appropriate session-revocation or permission controls and verify the result. [10]
Keep replacement material out of suspect hosts. Re-enroll clean workloads, test the required service paths, and monitor for attempted reuse of the old identities. Where an identity could write repositories, publish packages, or deploy production workloads, review those actions before returning its authority.
Evidence required to close the incident
Close each affected environment only when its owner can show:
- The resolved package or image that ran, with its acquisition and execution timeline, or evidence that the quarantined artifact never executed.
- A clean replacement artifact and build path, plus quarantine of poisoned caches and internal copies.
- Invalidation of exposed credentials and sessions, followed by delivery of replacement material to clean environments.
- Investigation of downstream access, publications, deployments, and persistence using the identities available to the compromised environment.
- Validation of business service recovery, monitoring coverage, and any remaining uncertainty accepted by the incident lead.
An inventory observation made before the release, a current clean version, or the absence of a temporary marker cannot answer whether the poisoned artifact executed earlier. Record those limits as open work with an accountable owner.
Reducing future exposure
Require reproducible dependency resolution with reviewed lockfiles and verified artifact hashes, and deploy container images by verified digest. Introduce a quarantine period for new dependency releases where operationally feasible. These controls should be backed by an exception process for urgent security fixes.
Constrain release workflows to approved repositories and revisions, protect privileged workflow changes, and separate review and publishing authority. Monitor approval overrides and source-owner changes. Retain build provenance together with the policy used to accept it.
Reduce the credentials and network access available to developers, build runners, and AI gateways. Separate model-serving and administrative functions, scope provider keys, and restrict metadata and outbound access where the workload does not require them. Preserve enough package, registry, runtime, and identity telemetry to trace an artifact into the services it can affect.
The response needs one connected record: which artifact ran, where it ran, what it could reach, who owns recovery, and what proves that the exposure is closed.
Get a rapid LiteLLM exposure assessment
Tonic can help identify compromised LiteLLM deployments, contact us for support.
We’ll support remediation, from coordinating patching and temporary mitigations to validating that the exposure has been addressed.
Technical appendix
Payload file hashes
SHA-256 values below are reported by SafeDep. Hashes differ by platform line endings. [4]
cook.pth
Linux and macOS 7f191632e7320705d154b85204f1ae546b543acbd7e8861229b76f5042b92bdb
Windows 84dc8c82c0a4a4a62552ef826b49fcc86d1a5c4a5d0f2c06665723f93d129d7d
cook.py
Linux and macOS 9dd0a3926f96a37eb86cf1ee2310d9be93139cc4ebef3ef9e2efe9531390be25
Windows 03ac2a8b752605d1d7710979c17ff18b03dd978203ba23ba97fd8ce3d6f897ea
sitecustomize.py
Linux and macOS 34bef04fe88ac9d0aae0475630b1738681d15b94f233ac8aa46eacf5968305fa
Windows b6122440d0d9cb1eb1ade9933f49214da8c31288de7710c076c2680dfa528465
Malicious wheel hashes
The seven wheel hashes are corroborated by AISLE, Aikido, and Mend. [11], [2], [6]
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
Container digest matching
For the base litellm image, Endor Labs reports the following index and platform manifests. Runtime imageID values may show a platform manifest, so matching only the index is incomplete. These are not a complete digest inventory for the separate litellm-database, litellm-non_root, or customer-derived images; retrieve their full provenance and manifests when scoping those variants. [3]
Multi-platform index
sha256:1bbcb1443bc962e45f5aad53fe3d2c30600e0379715fb6c664cdd3ac126c339e
Linux amd64 manifest
sha256:bd1aeee419ea36da9aa2b657288da4101887be468f020ac63d22ba6ed84a3ea5
Linux arm64 manifest
sha256:56b74573eed6e4aafe4b50603dbe7853e0345f188c8e44a09f1098caf1f4bcdf
Sources
1. LiteLLM incident report and response guidance, updated 21 October 2026 at 20:30 UTC in the version reviewed.
2. Aikido analysis and indicators, updated 22 October 2026.
3. Endor Labs artifact and startup-hook analysis, 21 October 2026.
4. SafeDep analysis and platform-specific hashes, 21 October 2026.
5. Python 3.13 documentation for site and startup hooks.
6. Mend analysis and credential targets, 21 October 2026. Later vendor reporting takes precedence over its early containment timeline.
7. JFrog payload and exfiltration analysis, 21 October 2026. Later vendor reporting takes precedence over its early uncertainty about publication.
8. Microsoft Defender DeviceFileEvents schema.
9. Microsoft Defender DeviceNetworkEvents schema.
10. AWS guidance on disabling temporary credentials.
11. AISLE wheel analysis and hashes, 21 October 2026.