Skip to content

Incident Breakdowns

We Only Used It for Testing: Inside the LiteLLM Supply Chain Attack

For a few hours, the official LiteLLM release carried an infostealer that took cloud keys, SSH keys and AI provider keys. Why “just testing” machines hold production keys, and what a cyber policy covers.

“We only used it for testing.” I hear some version of that every time a developer tool turns out to be compromised. It was a quick install on one laptop. It wasn’t in production. It was just to try something.

Here is the problem: the laptop where you “just tried something” is usually the one with the keys to everything.

On October 21, LiteLLM, a widely used open-source library that lets applications talk to more than 100 AI providers through one interface, shipped a poisoned release. For a few hours, version 1.107.0 on PyPI and the project’s official Docker images contained an infostealer and a remote-access tool. Anyone who installed it, or whose systems pulled the “latest” image automatically, needs to treat that machine as compromised.

How a trusted release went bad

This wasn’t a typo-squatted fake package. The real project published it, with real signatures, through its real release pipeline. LiteLLM’s own write-up describes a chain of small failures:

  • Attackers got into an internal LiteLLM system that was reachable from the internet and found developers’ GitHub tokens sitting in its logs.
  • With an organization owner’s token, they switched off branch protection and pointed the release workflow at a lookalike repository: Berri-AI instead of BerriAI.
  • A second stolen developer credential satisfied the production approval step. The malicious packages were built, signed and published.
  • A third stolen credential deleted the workflow records afterward.

The malicious wheels were on PyPI from 11:39 to about 13:23 UTC. The Docker tags stayed poisoned until 14:20 UTC. It’s also the second time this year LiteLLM has been compromised on PyPI. The first was in March.

What it took

The payload ran every time Python started on the machine, whether or not anything imported LiteLLM. According to StepSecurity’s analysis, it collected:

  • AWS, Azure and Google Cloud credentials, plus Kubernetes tokens
  • SSH, GPG and TLS private keys
  • Saved browser passwords and cookies
  • GitHub, npm, PyPI and Docker tokens, and every .env file it could read
  • Tokens for more than 20 AI coding tools
  • For LiteLLM proxy servers, every AI provider key stored in the database

Then it left behind a loader that checked in every hour for new instructions. Rotating a few passwords isn’t enough. The machine itself is untrusted until it’s rebuilt.

“We don’t write software”

You may not have developers. But you probably have a website vendor, an IT provider, or a contractor building an AI chatbot or automation for you. Their laptops and build servers hold your cloud logins, your API keys and your customer database passwords. When a tool they use goes bad, your credentials go with it.

And if you do build software, a poisoned dependency can travel through your product to your customers. That turns a security incident into a liability claim.

What to do this week

  • Ask the question. Check with your developers, IT provider and any AI vendor whether LiteLLM 1.107.0 or the affected images touched anything of yours between 11:39 and 14:20 UTC on October 21. If it did, rebuild those machines and rotate every credential they could reach.
  • Stop installing “latest.” Pin packages to exact versions and hashes, and pin containers to a digest. Automatic upgrades are how a two-hour window reaches you.
  • Add a waiting period. Most poisoned releases are caught within hours or days. Let new versions age before they reach production.
  • Keep long-lived keys off laptops. Use short-lived credentials and a secrets manager, so a stolen token expires before it’s useful.
  • Put a ceiling on AI spend. Hard budgets and usage alerts on every AI provider key turn a five-figure surprise into a capped one.

Where cyber insurance fits

If stolen credentials lead to your cloud environment or customer data, a cyber policy is built for the response: forensics, breach counsel, notification, restoring systems and the income you lose while you rebuild.

The gap to check is the bill. A stolen AI or cloud key can be used to run up usage charges quickly. Some cyber policies cover unauthorized use of your computing resources, often called cryptojacking or resource hijacking coverage, but the wording was written for electricity and cloud computing bills. Whether it reaches charges from a third-party AI provider hasn’t really been tested. Ask how your policy would treat that charge before you find out the hard way.

If you sell software or technology services, also look at your technology errors and omissions coverage. If something you shipped carries a bad dependency to your customers, that’s where their claims land.

“Just for testing” is still a production risk when the test machine holds production keys.

Sources

This article is educational and is based on public reporting at the time of writing. It does not alter any policy. Coverage is determined by the actual policy forms, endorsements and declarations issued by the insurer.

I Don’t Need Cyber Insurance

More from CIG Cyber Chronicles

All articles

Think you don’t need cyber insurance? Let’s test that against how your business actually runs.

Schedule a Coverage Review