Strike · Shield · Evolve

Field notes Research · March 6, 2026
See it in action Get a demo
Research

The LiteLLM Backdoor: Three Hours on PyPI, a Lifetime of Lessons

In March 2026 a backdoored build of a popular LLM gateway sat on PyPI for three hours. Short window, long shadow. We unpack what the incident reveals about the AI software supply chain.

The LiteLLM Backdoor: Three Hours on PyPI, a Lifetime of Lessons

In March 2026, a compromised release of LiteLLM — a widely used gateway for routing requests across language-model providers — appeared on the Python Package Index carrying a backdoor. It was pulled within roughly three hours. Three hours sounds like a rounding error. In a world of automated dependency resolution and CI pipelines that pull the latest package the moment it lands, three hours is an eternity.

The AI supply chain is still a software supply chain

There is a tendency to treat AI infrastructure as a new, exotic category with its own rules. It isn't. An LLM gateway is a Python package like any other, installed with pip, pinned (or not) in a requirements file, and pulled into production by automation that trusts the registry. Every lesson the industry learned the hard way about event-stream, ua-parser-js, and the long tail of typosquatting applies here — except the blast radius is larger, because an LLM gateway sits in the privileged position of seeing every prompt, every response, and often every API key.

Why this one matters more

A backdoor in a logging library steals what passes through logs. A backdoor in the component that brokers your model traffic potentially sees your users' data, your system prompts, and your provider credentials. As organisations rush to wire LLMs into everything, these gateways have quietly become some of the most sensitive software in the stack — and some of the least scrutinised.

What good looks like

The defence against supply-chain compromise is not glamorous, but it is well understood:

  • Pin and hash your dependencies. Pulling "latest" into production is an open invitation. Pin exact versions and verify hashes so a malicious release cannot silently slip in.
  • Stage before you ship. A short soak period in a controlled environment turns a three-hour exposure window into a non-event.
  • Watch outbound behaviour. A backdoor has to call home. Egress monitoring that flags a gateway suddenly talking to an unfamiliar host catches what dependency review misses.
  • Treat AI components as crown jewels. Apply the same scrutiny to your model infrastructure that you apply to your authentication layer, because it is every bit as sensitive.

The sovereignty angle

This incident is also a quiet argument for controlling your own AI stack. When your model routing, your inference, and your data all live inside infrastructure you govern, a poisoned public package is far less able to exfiltrate anything of value — there is nowhere for it to phone home that you aren't already watching. Sovereignty is not just about jurisdiction; it is about keeping the sensitive machinery of your AI under your own eye. The LiteLLM backdoor was caught in three hours. The next one might not be. Build as if it won't.