Supply Chain Attack Compromises LiteLLM Python Package, Injects Credential Stealer and Backdoor
What Happened — The open‑source LiteLLM Python library, widely used to interface with large‑language‑model (LLM) APIs, was compromised in a supply‑chain attack that inserted a credential‑stealing payload and a persistent backdoor. Researchers from SafeDep, Socket, StepSecurity, and Upwind reported that the malicious code was baked into version 1.107.0 of the package and published to the Python Package Index (PyPI) as well as to official Docker images. The compromised wheels and containers were available for download for several days before the PyPI maintainers quarantined the package and removed the tainted artifacts.
Why It Matters for Trust & Control Assurance — This incident tests the control objective of third‑party risk management and continuous monitoring of software components; Verisq’s Vendor Risk Management capability provides the evidence‑driven assurance needed to detect and remediate such supply‑chain compromises.
Who Is Affected —
- Developers building AI‑enabled applications that rely on LiteLLM.
- Enterprises that embed LiteLLM in production pipelines, especially those handling sensitive data or regulated workloads.
Recommended Actions
- Inventory every environment that installs LiteLLM ≥ 1.107.0 and generate a Software Bill of Materials (SBOM) to confirm exposure.
- Remove the compromised version immediately; reinstall from a clean source or pin to a safe release (e.g., 1.106.0).
- Rotate any API keys or credentials that may have been harvested by the backdoor.
- Enable package‑signing verification (e.g., PEP 458/PEP 480) and enforce signed‑artifact policies in CI/CD pipelines.
- Integrate continuous third‑party risk monitoring to flag future malicious updates before they reach production.
Source: The Hacker News
Technical Notes —
- Attack Vector: Malicious code was injected into the PyPI wheel and Docker image during the build process, effectively turning the package into a supply‑chain trojan.
- Payload: A credential‑stealer that searches for stored LLM API keys and exfiltrates them to an external C2 server, plus a backdoor that allows remote command execution on any host that imports the compromised library.
- Affected Versions: LiteLLM 1.107.0 (both the source distribution and pre‑built wheels). Earlier versions are not known to be affected.
- Distribution Channels: PyPI (wheel files) and official Docker Hub images tagged
litellm:1.107.0. - Detection: The compromise was uncovered by multiple independent security firms analyzing anomalous network traffic from containers that had imported the package.
- Remediation Status: PyPI has quarantined the package; Docker Hub has removed the affected images. The upstream maintainers are issuing a security advisory and recommending users upgrade to a clean release.