Security

Your LLM gateway is a credential vault, and someone's agent is picking the lock

The agent conversation this month is about what models can do. The more useful story is what agents are doing to our infrastructure while we argue about benchmarks.

The agent conversation this month is about what models can do. The more useful story is what agents are doing to our infrastructure while we argue about benchmarks.

On November 13, Amazon's threat intelligence team published findings from its MadPot decoy network. Between October 3 and November 5, decoy servers posing as LLM inference APIs captured requests from attacker-controlled AI agents. Those requests carried the agents' own working memory: operator instructions, target lists, and reported findings. That is evidenced, with one caveat Amazon states plainly. It did not watch the compromises happen and cannot verify what the agents claim to have achieved.

What the agents were doing

The main campaign was credential theft at industrial scale, and it paid for itself. Agents found internet-exposed AI applications, pulled the upstream provider keys stored inside, validated them, and dropped them into a shared pool. Stolen keys then paid for the model calls that powered the next round of searching. Amazon describes the loop as self-sustaining.

The target list is the part worth your attention, because it is not exotic. It is the software teams install quietly for a pilot. On the gateway side: LiteLLM, One API, New API, Veloera, Sub2API. On the app side: Dify, FastGPT, Langflow, RAGFlow, Open WebUI, LobeChat, Ollama. The agents preferred applications that aggregate keys for many providers, because one weak admin page there exposes every downstream account.

None of the entry points were clever. Amazon's records list unchanged default administrator credentials, including what it calls LiteLLM's default master key; installs that were never finished, which anyone can claim by completing setup; management endpoints that answer without a login; an authentication bypass via the isCliRequest header in the One API family; SSRF into cloud metadata services; and secrets sitting in client-side JavaScript, source maps, debug routes, and .env files.

Cloudflare's incident responders published the numbers the same week (vendor telemetry, November 13). Over three days they saw more than 50 families of AI pentest frameworks scanning customers, with unique source IPs now in the thousands. In one case an agent reached a compromised account-level API token used for CI/CD that carried no IP restrictions and no expiry. What followed was more than 69 requests per minute across several parts of the account and 400 database dump requests in an hour. The FBI issued a FLASH alert covering the same tooling on November 13.

Why this lands on engineering teams

Three things make this different from the usual "someone left an admin panel open" story.

The keys are money. A provider key is a billing relationship, a rate limit, and often a data processing agreement. When one leaks you are not resetting a password, you are reconciling invoices and explaining to procurement why your traffic pattern suddenly looks like someone else's.

The AI infrastructure layer is unusually dense with credentials. One LiteLLM or Dify install can hold keys for Anthropic, OpenAI, Bedrock, Vertex, and whatever internal model endpoint someone wired up at 2am. Teams ran these because procurement was slow and one engineer wanted to ship. That is not a moral failing, it is the normal route a tool takes into production.

The supply chain for these tools is thin. LiteLLM was compromised twice in 2026. The October 21 incident shipped litellm==1.107.0 to PyPI with a credential stealer in cook.pth, cook.py, and sitecustomize.py. Those files run on every Python start, even if the application never imports the library. The release was live for about 100 minutes and received roughly 49,000 downloads before it was quarantined, per Wiz's analysis of ClickPy data. The wheels were built from a lookalike repository, Berri-AI/litellm, one hyphen off the real one. The maintainers' own writeup is worth reading in full; the attacker used an organization owner token stolen 11 days earlier.

The half we do to ourselves

While attackers go after gateways, we hand tokens to coding agents by default. The standard setup is a VM with ~/.config/gh/hosts.yml and a provider key in the environment, plus ssh -A when the agent needs to reach a host. Every process on that box gets the same access, for as long as the token lives, with no record of what used it.

Antonio Mika wrote up a better shape on November 13 and released tooling for it. Keep credentials on the laptop, forward a policy-controlled proxy socket instead of the real SSH agent, and require per-request approval with short leases. The Hacker News thread pushed back immediately, and the pushback is right: if you approve gh repo view, you have not solved the trust boundary, you have added ceremony around it. His own post concedes the limits, including that an approved command runs as you and can read your files.

The stronger version of the argument, from that same thread: give the agent its own identity, not yours. A separate GitHub account with narrow ACLs, a token that cannot touch main, and an audit trail that names the agent rather than you. More work up front, and it is the only version that survives a compromised dependency.

What I would do this week

Treat the model provider key like a database credential. That one sentence covers most of the list below.

  • Inventory every self-hosted AI component you can reach from the internet, including the ones one engineer installed. Start with LiteLLM, Dify, Open WebUI, Ollama, Langflow, and RAGFlow.
  • Change every default admin credential and every LiteLLM master key. Put the admin plane behind SSO or take it off the public internet.
  • Issue one provider key per application, not per organization. Put a spend limit on each, and rotate on a schedule shorter than your incident response time.
  • Alert on spend anomalies and model-mix changes. A stolen key shows up as odd traffic and unfamiliar models long before it shows up as a breach report.
  • Pin AI infrastructure dependencies by version and digest. If you ran LiteLLM 1.107.0 in October, treat that host as compromised and look for cook.pth and sitecustomize.py in site-packages.
  • Stop giving agents your identity. Separate account, scoped token, expiry, and a log you can read.

The uncomfortable part is that none of this is AI-specific. Default credentials, exposed admin panels, over-scoped static tokens, unpinned dependencies. Amazon's own summary makes the point: the techniques were not new, and what agents change is speed and persistence.

That is the actual lesson. The attacker got faster. The defense is still boring.

Unverified claims and gaps

  • Amazon did not observe the compromises as they happened and cannot verify the outcomes the agents reported. It captured intent and technique, not confirmed victims.
  • Attribution to China-linked groups is at "moderate confidence" per Amazon. Cloudflare did not attribute at all.
  • There is no public count of affected organizations. The ~49,000 download figure comes from Wiz's ClickPy analysis, not from PyPI or BerriAI.
  • I did not read the FBI FLASH alert itself, only reporting that summarizes it.
  • Amazon's report names no affected versions or fix for the isCliRequest bypass in the One API family.

Sources

  1. Amazon Threat Intelligence observes threat actors running cybercrime campaigns with ARTEX AI agents, AWS Security Blog, 13 Nov 2026. https://aws.amazon.com/blogs/security/amazon-threat-intelligence-observes-threat-actors-running-cybercrime-campaigns-with-artex-ai-agents/
  2. Amazon Uncovers AI Agent Campaign Targeting LiteLLM, Dify, and Other Apps for API Keys, The Hacker News, 16 Nov 2026. https://thehackernews.com/2026/11/amazon-uncovers-ai-agent-campaign.html
  3. Adapting to AI penetration testing orchestrators: The Modern Security Model, Cloudflare Blog, 13 Nov 2026. https://blog.cloudflare.com/adapting-to-ai-penetration-testing-orchestrators/
  4. Contained: Oct 21, 2026 LiteLLM release v1.107.0 Compromised, LiteLLM, 21 Oct 2026. https://docs.litellm.ai/blog/security-incident-oct-21-2026
  5. The attack chain behind the v1.107.0 LiteLLM release, LiteLLM, 23 Oct 2026. https://docs.litellm.ai/blog/security-incident-oct-21-2026-attack-chain
  6. LiteLLM Compromised, Steals Credentials, Wiz, 21 Oct 2026. https://www.wiz.io/blog/litellm-compromised-steals-credentials
  7. LiteLLM PyPI Package and Docker Images Compromised to Steal Cloud and AI Credentials, Socket, 21 Oct 2026. https://socket.dev/blog/litellm-compromise
  8. Running coding agents without handing them my credentials, antonio's blog, 13 Nov 2026. https://blog.antonio.cx/running-agents-with-lend
  9. Running coding agents without handing them my credentials (discussion), Hacker News, 17 Nov 2026. https://news.ycombinator.com/item?id=50526152
  10. Threat actors use agentic AI tooling to find and abuse exposed secrets, Microsoft Security Blog, 5 Nov 2026. https://www.microsoft.com/en-us/security/blog/2026/11/05/threat-actors-use-agentic-ai-tooling-to-find-and-abuse-exposed-secrets/
Next essay

AI Closed the Patch Window. Most Teams Still Budget for Weeks

7 min read