78,330 keys. 2,186 organizations. 40 minutes.
That's the haul from a single supply-chain injection targeting LiteLLM, the open-source LLM gateway that powers countless AI agents—including those driving automated trading strategies in crypto. The attack didn't exploit a zero-day in the code. It exploited the most trusted layer of the Python ecosystem: PyPI.
Tracing the alpha trail through the noise—this wasn't a random spray. It was a precision strike against the credential infrastructure that modern AI agents rely on to move value.
Context: Why LiteLLM Matters
LiteLLM is the Swiss Army knife for AI developers. It abstracts 100+ LLM providers behind a single API, handling rate limits, fallbacks, and key management. For crypto trading bots, it's become the default gateway to call GPT-4 for sentiment analysis, Claude for contract audits, or Gemini for market predictions. If you're running an autonomous trading agent today, there's a >60% chance it routes through LiteLLM.
That makes it a honey pot. The project's core promise—unified API key management—also means a single breach leaks every key your agent uses.
Core: The Technical Mechanics
The attack vector was deceptively simple. Attackers pushed two malicious versions of LiteLLM to PyPI: 1.82.7 and 1.82.8. The payload was a .pth file named litellm_init.pth. Here's the kicker: Python automatically executes .pth files at startup, even without an explicit import. No developer action required. No code review catches it because the file isn't in the source tree.
Decoding the invisible edge in the block—the .pth mechanism is a feature, not a bug. It's designed for adding paths, but it's been weaponized as a silent execution vector. The attackers knew their Python packaging internals cold.
Once active, the payload harvested: - SSH keys - AWS/GCP/Azure cloud credentials - Kubernetes tokens - LLM API keys (OpenAI, Anthropic, etc.)

All exfiltrated to a spoofed domain: models.litellm.cloud. Visually identical to the legitimate litellm.cloud.
The attacker's collection pipeline was fully automated. Within 40 minutes, 78,330 credentials were stolen from 2,186 organizations. That's 32 credentials per second.
Based on my own MEV-Boost audit experience, I've seen how race conditions in infrastructure can be exploited. But this is different. This is a supply-chain siege, not a code bug. The attackers didn't need to find a vulnerability in LiteLLM's logic—they simply poisoned the delivery mechanism.
Contrarian: The Real Target Isn't API Keys
Mainstream coverage will focus on LLM API key theft. Yes, that's painful. But let's think deeper.
Chaos is just data waiting to be organized. If you're running a crypto trading bot, your LiteLLM instance holds keys for multiple exchanges, on-chain wallets, and model providers. An attacker who steals those keys can: - Drain your exchange accounts - Impersonate your agent to manipulate market-making signals - Use your LLM credits to run their own inference—at your cost
But there's a more insidious angle. The attackers also stole SSH keys and Kubernetes tokens. That means they can move laterally into your agent's runtime environment. They can modify the decision logic itself. Your AI agent might start executing trades you didn't authorize, with the keys you trusted.
The attack isn't just about credential theft. It's about infrastructure hijacking. The attackers positioned themselves to control the entire agent pipeline: from model selection to trade execution.
And here's the part that's not being reported: the .pth file was only a data collector. No persistence mechanism was mentioned in the disclosure. But a sophisticated attacker wouldn't stop there. When the peg breaks, the truth arrives—the real question is whether the attackers installed backdoors, cron jobs, or new users that survive package updates.

Takeaway: The Next Wave Will Target Orchestration
CloudSEK, the firm that discovered the attack, warns that future campaigns will target AI gateways, agent runtimes, MCP servers, and vector stores. These are the connective tissues of the agentic web. Once compromised, attackers can penetrate the decision loop itself.
For crypto-native developers, the lesson is brutal: your dependency on open-source packages is your greatest attack surface. The same code that gives you speed also gives attackers a highway into your infrastructure.
The architecture of belief vs. the code of fact—you believed PyPI was safe. The code says otherwise.
What's the fix? Start treating your requirements.txt like a contract. Pin every direct and transitive dependency. Use hash verification. Run dependency audits in CI/CD. And for the love of alpha, never store long-lived keys in environment variables accessible to your agent's runtime.
The attackers had 40 minutes. Your window to secure your stack is closing faster.
Speed reveals what stillness conceals. The next attack won't give you 40 minutes. It'll give you four.