Malicious LiteLLM Versions Harvest Credentials
Compromised versions of the LiteLLM package (1.82.7 and 1.82.8) on PyPI contained malware designed to harvest sensitive credentials and files, exfiltrating them to a remote API, impacting users who installed and ran the package.
On March 25, 2026, two malicious versions of the litellm package (versions 1.82.7 and 1.82.8) were discovered on the PyPI repository. These versions were found to contain automatically activated malware. The malicious code was designed to harvest sensitive credentials and files from systems where the compromised packages were installed. This supply chain attack follows a previous API token exposure stemming from a compromised trivy dependency, indicating a potential escalation in targeting the litellm project. The compromised packages exfiltrate stolen data to a remote API controlled by the attacker.
Attack Chain
- An attacker compromises the
litellmPyPI package repository, likely leveraging exposed credentials. - The attacker injects malicious code into versions 1.82.7 and 1.82.8 of the
litellmpackage. The malicious code is automatically activated upon installation. - A user installs either
litellmversion 1.82.7 or 1.82.8 viapip. - Upon execution, the malicious code begins harvesting credentials and files accessible to the
litellmenvironment. This may include API keys, tokens, and other sensitive information. - The malware establishes a network connection to a remote API server controlled by the attacker.
- The harvested credentials and files are exfiltrated to the attacker’s remote API server.
- The attacker gains unauthorized access to services and data protected by the stolen credentials.
Impact
This supply chain attack directly impacts any user who installed the malicious litellm packages (versions 1.82.7 and 1.82.8). Successful credential harvesting allows attackers to pivot and compromise other systems and services accessible with the stolen credentials, potentially leading to data breaches, unauthorized access, and further lateral movement within victim environments. The number of affected users is currently unknown, but the popularity of litellm suggests a potentially wide impact.
Recommendation
- Immediately revoke and rotate any credentials accessible to environments where
litellmversions 1.82.7 or 1.82.8 were installed (description). - Deploy the following Sigma rule to detect installations of the affected
litellmversions (Sigma rule). - Monitor network traffic for connections originating from
litellmprocesses to external, untrusted APIs (network_connection). - Implement strong dependency management practices, including the use of software composition analysis tools, to identify and prevent the installation of malicious packages (overview).
Detection coverage 2
Detect Installation of Malicious LiteLLM Versions
criticalDetects the installation of compromised LiteLLM packages versions 1.82.7 and 1.82.8 via pip
Suspicious File Creation in LiteLLM Package Directory
highDetects suspicious file creation events within the litellm package installation directory, potentially indicating malware activity.
Detection queries are kept inside the platform. Get full rules →