cd /news/ai-safety/ai-agents-are-stealing-api-keys-from… · home › topics › ai-safety › article
[ARTICLE · art-170448] src=byteiota.com ↗ pub= topic=ai-safety verified=true sentiment=↓ negative

AI Agents Are Stealing API Keys From LiteLLM and Dify Instances

Amazon Threat Intelligence reported on November 16 that its MadPot honeypot network observed autonomous AI agents running a 34-day campaign, from October 3 to November 5, 2026, against exposed LiteLLM, Dify, Langflow and other self-hosted AI infrastructure, extracting stored OpenAI, Anthropic and Cohere API keys and validating them against the providers. Amazon attributes the campaign with moderate confidence to separate Chinese-nexus threat groups and assessed that the open-source ARTEX AI penetration testing framework powered it, with validated keys pooled to fund further scanning so victims' API budgets paid for the next attack. Amazon said it cannot independently verify the outcomes the agents claimed in their own records, and noted the operation is distinct from the October poisoning of a LiteLLM release on PyPI.

read4 min views4 publishedNov 16, 2026
AI Agents Are Stealing API Keys From LiteLLM and Dify Instances
Image: Byteiota (auto-discovered)

For 34 days, autonomous AI agents hunted the internet for exposed LiteLLM, Dify, and Langflow instances — extracting stored API keys, validating them against OpenAI and Anthropic, and feeding the working ones back into the attack to fund the next round of hunting. Amazon’s MadPot honeypot network caught the whole operation. The attackers handed over their own playbook.

The Accidental Confession #

Amazon’s MadPot team configured decoy servers to impersonate LLM inference endpoints — services that look, from the outside, like a standard chat/completions API. Between October 3 and November 5, 2026, those honeypots received a steady stream of requests from autonomous agents. The requests were unremarkable. What they carried was not.

Because ARTEX — the open-source AI penetration testing framework assessed to have powered the campaign — sends its full conversation history with every API request, each call to a fake endpoint delivered the agent’s complete operational memory: system prompts, tool call logs, shared knowledge-graph state, and campaign findings. Amazon didn’t crack a server. The agents confessed.

Amazon Threat Intelligence published its findings on November 16 and attributes the campaign with moderate confidence to separate Chinese-nexus threat groups. Amazon is careful to note it cannot independently verify the outcomes the agents claimed in their own records.

The Self-Funding Loop #

The campaign’s mechanics are worth understanding because they explain why it ran for a month without stopping.

The agents targeted self-hosted AI infrastructure: LLM gateways (LiteLLM, One API, New API, Veloera, Sub2API) and AI application builders (Dify, FastGPT, Langflow, RAGFlow, Open WebUI, LobeChat, Ollama). These tools, by design, store provider API keys — OpenAI, Anthropic, Cohere — to route requests on your behalf. That key store is exactly what the agents were after.

Once a working key was extracted and validated, it went into a shared pool. That pool funded the AI inference powering the next round of scanning. Victims’ API budgets paid for the attack on the next victim. The campaign had no ongoing operating cost once it found its first working key.

How Agents Found Exposed Instances #

This was not a dumb port scan. The agents cross-referenced seven distinct discovery sources: internet scanning services, certificate transparency logs, GitHub repositories, npm and PyPI package tarballs, container image layers, paste sites, and Telegram credential dump channels.

That last category matters. A developer key accidentally committed to a public GitHub repo in 2024, rotated but left in git history, buried in a Docker image layer — these are all viable targets. The agents had no shortage of leads.

This Is Not the LiteLLM Supply Chain Story #

In October, a poisoned LiteLLM release on PyPI was the attack vector. That was a dependency poisoning problem. This is different: agents scanning the internet for misconfigured, internet-exposed instances and extracting keys through API access, not through malware. Two distinct threat vectors, one vulnerable tool category.

Your LLM Gateway Is Your Most Valuable Credential Store #

Developers who would never expose a PostgreSQL instance to the public internet routinely run LiteLLM accessible on port 4000 from anywhere, default credentials intact. The LLM gateway now holds keys to every AI provider account in your stack — OpenAI, Anthropic, Cohere, Gemini — often with no rate limits, no expiry, and no IP restrictions. That is a more valuable credential store than most databases.

The attack surface isn’t subtle. These tools are designed to be convenient. Convenience, when exposed to the internet without hardening, is a vulnerability.

What to Do Now #

Amazon’s recommendations, plus the obvious ones they left implicit:

  • Take your admin interface off the public internet. LiteLLM, Dify, Open WebUI, and Langflow should not have admin UIs reachable from arbitrary IPs. Put them behind a VPN, SSH tunnel, or at minimum a firewall rule.
  • Rotate every provider API key stored in your gateway. Treat any key that has been in a gateway instance as potentially compromised. Revoke at the provider, not just in your config.
  • Upgrade LiteLLM to 1.83.9 or later. This patchesCVE-2026-35029 and CVE-2026-59823 , which let low-privilege users access admin functions and redirect API traffic to attacker-controlled servers.
  • Add expiry and IP allowlists to Cloudflare API tokens. Amazon specifically calls this out in its advisory.
  • Check for ARTEX-related Cloudflare Workers namedartex-* ,artex-pgrecon-* ,artex-pgw-* , orartex-do-* in your account.
  • Move secrets into a secrets manager.Environment variables are not secrets management. AWS Secrets Manager, HashiCorp Vault, and GCP Secret Manager all support short-lived, auto-rotating credentials.

AI-powered attacks against AI infrastructure are not theoretical anymore. Amazon ran a 34-day honeypot and caught the evidence. The agents are already on the internet. The question is whether your instance is on their list.

── more in #ai-safety 4 stories · sorted by recency
── more on @amazon 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/ai-agents-are-steali…] indexed:0 read:4min 2026-11-16 · —