Breaking: Malicious LiteLLM Update Sparks Global Supply Chain Cyberattack, Exposing Cloud Secrets and Kubernetes Systems

Software supply chain attacks are no longer rare events—they are becoming one of the most dominant threats in cybersecurity today. Over the past year, attackers have shifted from traditional intrusion techniques to more subtle and scalable approaches, often targeting developers and open-source ecosystems. This report analyzes a recent incident from March 2026, where the widely used Python library LiteLLM was compromised and weaponized to distribute malware.

This attack highlights how a single compromised package can escalate into a full infrastructure breach, affecting cloud environments, developer systems, and containerized workloads simultaneously.


Background: The Rise of Supply Chain Threats

Modern development relies heavily on open-source libraries. While this accelerates innovation, it also introduces risk. Attackers are increasingly exploiting trust in these ecosystems by:

  • Publishing malicious packages disguised as legitimate tools
  • Injecting harmful code into existing libraries
  • Compromising developer accounts to push infected updates

The LiteLLM incident fits into this pattern, but stands out due to its multi-layered attack design, targeting both local systems and cloud infrastructure.


Incident Overview

In March 2026, attackers uploaded two malicious versions of the LiteLLM library to the Python Package Index (PyPI):

  • litellm==1.82.7
  • litellm==1.82.8

These versions appeared normal but contained hidden payloads designed to extract sensitive data and establish persistent access.

The compromise occurred within the package distribution itself:

  • Version 1.82.7 embedded malicious code inside proxy_server.py
  • Version 1.82.8 introduced a .pth file (litellm_init.pth) enabling automatic execution at interpreter startup

This subtle difference made version 1.82.8 more dangerous, as it triggered execution without requiring explicit import.


Technical Breakdown

Initial Execution Mechanism

Both malicious versions contained Base64-encoded Python code. Once executed:

  1. The code decoded itself
  2. Dropped a file named p.py
  3. Immediately executed the script

This script then launched a second-stage payload directly in memory, avoiding disk detection.


Data Encryption and Exfiltration

Before sending stolen data, the malware implemented strong encryption:

  • Data encrypted using AES-256-CBC
  • Encryption key stored in session.key
  • Key itself encrypted using RSA public key

The final output was packaged into:

tpcp.tar.gz

This archive was then transmitted to the attacker’s command-and-control (C2) server.


System and Data Reconnaissance

The malware performed a recursive scan of critical directories such as:

  • /root
  • /app/
  • /var/www

It collected:

  • File contents
  • System metadata
  • Configuration data

The focus was on extracting sensitive assets, including:

  • SSH keys
  • Git credentials
  • .env files
  • Cloud and database configurations
  • TLS certificates
  • CI/CD and infrastructure files

Cloud Credential Harvesting

A key feature of this malware was its ability to extract runtime secrets from cloud environments.

It queried:

  • 169.254.169.254 → AWS Instance Metadata Service (IMDS)
  • 169.254.170.2 → Amazon ECS credential endpoint

This allowed attackers to retrieve:

  • Temporary IAM credentials
  • Active cloud session tokens

Unlike static secrets, these credentials provide immediate access to cloud resources, making them extremely valuable.


Additional Targets

The malware also searched for:

  • Crypto wallet configurations
  • Slack and Discord webhooks

This suggests attackers were not only interested in infrastructure, but also:

  • Financial assets
  • Internal communication channels

Kubernetes Exploitation and Persistence

One of the most advanced aspects of this attack was its Kubernetes exploitation strategy.

If sufficient permissions were available, the malware:

  1. Created a privileged pod
  2. Enabled: securityContext.privileged=true
  3. Mounted the host filesystem using hostPath

This effectively allowed the attacker to escape the container and gain node-level access.


Persistence Mechanism

The malware deployed a secondary script:

/root/.config/sysmon/sysmon.py

This script:

  • Registered itself via systemd
  • Waited 300 seconds before execution
  • Periodically contacted the C2 server:
checkmarx[.]zone/raw

If a new payload was available:

  • It downloaded it to /tmp/pglog
  • Executed it in the background

This ensured long-term persistence, even after container termination.


Fallback Persistence (Non-Kubernetes Systems)

If Kubernetes was not present, the malware adapted:

~/.config/sysmon/sysmon.py

It still registered via systemd, maintaining persistence at the user level.


NodeJS Variant via OpenVSX

The campaign extended beyond Python.

Two compromised extensions were discovered:

  • ast-results 2.53.0
  • cx-dev-assist 1.7.0

These extensions delivered a NodeJS-based payload:

checkmarx-util-1.0.4.tgz

Differences from Python Variant

  • No Kubernetes privilege escalation
  • Limited directory scanning
  • Focused on local persistence only

Despite being less aggressive, this variant was still dangerous due to its integration into development tools.


Victim Distribution

The attack impacted organizations globally. The highest concentration of infection attempts was observed in:

  • Russia
  • China
  • Brazil
  • Netherlands
  • UAE

This indicates a broad, opportunistic campaign rather than a highly targeted one.


Indicators of Compromise (IOCs)

Malicious Domains

models[.]litellm[.]cloud
checkmarx[.]zone

Infected Package Hashes

85ED77A21B88CAE721F369FA6B7BBBA3
2E3A4412A7A487B32C5715167C755D08
0FCCC8E3A03896F45726203074AE225D

Malicious Scripts

F5560871F6002982A6A2CC0B3EE739F7
CDE4951BEE7E28AC8A29D33D34A41AE5
05BACBE163EF0393C2416CBD05E45E74

Response and Mitigation

At the time of reporting, the malicious packages have been removed from PyPI and OpenVSX. However, systems that installed them remain at risk.

Recommended Actions

  • Perform a full system scan
  • Rotate all credentials:
    • API keys
    • SSH keys
    • Environment variables
    • Kubernetes tokens
  • Inspect systems for:
    • sysmon.py files
    • Suspicious Kubernetes pods
  • Audit dependencies and rollback compromised packages
  • Monitor network traffic for IOC-related activity

Our Analysis and Perspective

This incident clearly demonstrates how supply chain attacks are evolving into multi-dimensional threats that go far beyond simple malware delivery. What makes this case particularly concerning is not just the compromise itself, but the level of sophistication and intent behind the payload design.

The attackers did not limit themselves to stealing files from a developer’s machine. Instead, they built a layered attack capable of extracting value at every level of modern infrastructure. From local credentials to cloud metadata services and Kubernetes clusters, the malware was engineered to maximize access and persistence. This reflects a deep understanding of how modern applications are built and deployed.

Another important observation is the focus on runtime secrets. Traditional security practices often emphasize protecting static credentials, but this attack shows that temporary tokens and metadata services are equally, if not more, critical. By targeting AWS IMDS and ECS endpoints, the attackers bypassed many conventional defenses and gained access to live cloud environments.

The Kubernetes persistence mechanism is also noteworthy. Escaping containers and establishing node-level access is not trivial, yet the malware automated this process efficiently. This suggests that attackers are increasingly comfortable operating in containerized environments, which many organizations still consider relatively secure by default.

The inclusion of crypto wallets and communication tools like Slack and Discord further indicates that attackers are diversifying their objectives. Financial theft, lateral movement, and intelligence gathering are all part of a single campaign, rather than separate attack stages.

From a defensive standpoint, this case reinforces the need for visibility across the entire development lifecycle. Security cannot be limited to production systems—it must extend to dependencies, CI/CD pipelines, and developer environments. Organizations that lack supply chain monitoring are particularly vulnerable.

In our view, the biggest lesson here is trust erosion. Open-source ecosystems rely heavily on trust, but incidents like this show that trust must be continuously verified. Automated dependency scanning, strict version control, and runtime monitoring are no longer optional—they are essential.

Ultimately, this attack is a strong reminder that modern threats are interconnected. A single compromised library can become the entry point for a full-scale infrastructure breach, and organizations must adapt their defenses accordingly.


Conclusion

The LiteLLM supply chain attack is a clear example of how attackers are leveraging trusted ecosystems to gain widespread access. By combining stealth, encryption, cloud exploitation, and persistence techniques, this campaign demonstrates a high level of maturity.

Organizations must rethink how they approach dependency security and adopt proactive measures to detect and mitigate such threats before they escalate.