
Supply chain compromise affecting the LiteLLM library (versions v1.82.7 and v1.82.8) resulted in the distribution of malicious packages via PyPI. These packages contained embedded data exfiltration capabilities, enabling unauthorized data collection from downstream environments.
Multiple organizations were potentially exposed due to implicit trust in third-party dependencies. Mercor, an AI talent platform, is one confirmed impacted entity, with threat actor claims suggesting ~4TB of data exfiltration.
The compromise leveraged Python’s .pth execution mechanism to achieve implicit code execution during interpreter initialization. This enabled payload delivery without explicit invocation, significantly reducing visibility in traditional monitoring controls.
The incident originated from malicious LiteLLM package versions (v1.82.7 and v1.82.8) published to PyPI. The attacker likely gained access to a maintainer account, allowing direct package publication and bypassing standard CI/CD controls.
Public disclosures confirm unauthorized package publication (Figure 1), while analysis of package contents confirms the presence of malicious payloads (Figure 2). Further analysis reveals the use of a .pth-based mechanism that enables execution during interpreter initialization.


The .pth mechanism is processed by Python’s site.py, allowing arbitrary code execution during interpreter initialization without explicit import.
.pth file is written to site-packages.pth during startup via site.py
The malware uses Base64-encoded payloads that are decoded and executed at runtime via dynamic evaluation functions such as exec, reducing static detection visibility (Figure 4).

# Representative execution pattern
decoded_payload = base64.b64decode(encoded_string)
exec(decoded_payload)
The decoded payload executes within the Python runtime and stages collected data into local files (e.g., collected), indicating preparation for bulk exfiltration (Figure 5).

Observed artifacts indicate symmetric encryption (likely AES-CBC) for securing data prior to exfiltration. A hardcoded RSA key suggests possible hybrid encryption, though key exchange cannot be fully verified (Figure 6).

Data is exfiltrated using HTTP POST requests via curl, uploading archived data (tpcp.tar.gz) using raw binary transfer (--data-binary) (Figure 7).

This approach avoids reliance on custom malware networking stacks, instead leveraging trusted system utilities to reduce detection surface.
Mercor represents a downstream victim of the LiteLLM supply chain compromise, rather than a directly targeted intrusion. The platform handles sensitive AI training and operational data, increasing impact severity (Figure 8)

Threat actor activity demonstrates extortion-driven monetization. The dataset was publicly advertised and paired with payment demands, consistent with opportunistic breach monetization (Figures 9–10).
While informative, these claims remain partially unverified.


The breach reportedly includes:
This distribution suggests access across multiple internal systems, indicating broad data exposure rather than isolated compromise (Figure 11).

Exposure spans multiple sensitivity tiers, increasing both privacy and operational risk (Figures 12–15).




.pth files*.tar.gz)python → base64 decode → file write → curl POST
process.name: python AND process.child.name: curl
Files
Processes
Network
.pth.pth execution provides stealthy persistenceThe LiteLLM compromise demonstrates how upstream dependency attacks propagate across multiple organizations. The Mercor breach illustrates downstream impact within sensitive AI ecosystems.
The abuse of Python initialization mechanisms highlights how trusted runtime behavior can be weaponized, reinforcing the need for behavioral monitoring beyond signature-based detection.
Contributors:
Siva Prasad Boddu

Rudra Pratap
