Skip to main content

The Supply Chain Pivot: How TeamPCP Weaponized the AI Infrastructure Pipeline

A sophisticated supply chain attack targeting the LiteLLM library has exposed a troubling evolution in how threat actors compromise modern development environments. According to research from Forcepoint X-Labs, the threat group known as TeamPCP successfully injected malicious code into LiteLLM versions 1.82.7 and 1.82.8, transforming a popular gateway for large language models into a potent credential-harvesting engine.

This incident marks a departure from traditional typosquatting, where attackers rely on developer error. Instead, TeamPCP targeted the integrity of continuous integration (CI) workflows by poisoning a foundational security tool, demonstrating that even organizations with robust security scanning can be undermined by the very utilities designed to protect them.

Compromising the Gatekeeper via Trivy

The breach did not originate from the LiteLLM source code itself. TeamPCP instead prioritized the compromise of Trivy, a widely utilized open-source vulnerability scanner. By spoofing maintainer identities and submitting deceptive commits, the attackers gained control over Trivy’s automated release pipeline.

When LiteLLM’s automated build process fetched the compromised Trivy binary, the malware executed within the CI runner. This allowed the attackers to scrape memory and exfiltrate a critical `PYPI_PUBLISH` token. Armed with these credentials, the threat actors bypassed the official maintainers, authorized their own malicious LiteLLM releases, and distributed them directly through the Python Package Index (PyPI).

Multi-Stage Persistence and Exfiltration

The two tainted versions of LiteLLM employed distinct, increasingly stealthy methods to ensure execution. Version 1.82.7 used a straightforward Base64-encoded payload within the proxy server script. Version 1.82.8, however, adopted a more aggressive persistence mechanism by installing a `.pth` file, ensuring the malicious payload initialized whenever the Python interpreter started—effectively decoupling the execution from the package’s explicit use.

Once active, the malware acted as a comprehensive exfiltration suite, targeting:

API Credentials: OpenAI, Anthropic, and Microsoft Azure configuration files.
Infrastructure Keys: AWS, Google Cloud, and Azure SDK secrets.
System Intelligence: Kubeconfig files and environment variables, providing lateral movement capabilities.

Data was packaged into a local archive and exfiltrated to an attacker-controlled domain designed to mimic the genuine LiteLLM infrastructure. Furthermore, the inclusion of a polling backdoor, Sysmon.py*, ensures long-term access, allowing the attackers to download and execute secondary binaries at will.

Strategic Implications for AI Governance

This breach serves as a stark warning: AI middleware has become a high-value target for cybercriminals. LiteLLM acts as a centralized nexus for enterprise AI operations, abstracting the complexity of multiple LLM providers. As pointed out by Prashant Kumar of Forcepoint, the consolidation of access via such libraries creates a single point of failure. A compromise of one library effectively grants an intruder the keys to the kingdom across a multi-vendor AI ecosystem.

The broader industry takeaway is clear: the integration of third-party tools into automated development pipelines must be re-evaluated. If security tools like Trivy can be weaponized to bypass internal controls, existing trust models are insufficient. Organizations must now treat AI-enabling middleware as critical infrastructure, subject to the same stringent auditing, runtime protection, and supply chain security frameworks typically reserved for core production software.