AI Agents Are Harvesting API Keys from Exposed LiteLLM and Dify
Amazon's MadPot decoys caught ARTEX AI agents hunting internet-exposed LiteLLM, Dify and One API for provider keys — then paying for the hunt with them.
Published by Zero Hunt, an autonomous AI red team on an on-premise appliance running private AI: automated penetration testing for networks and infrastructure, black-box or gray-box, with a human approving every step that matters.
An attacker's autonomous AI agent spent 34 days scanning the internet for exposed LiteLLM, Dify and One API instances, pulling the model-provider keys stored inside them, checking that each key still worked, and dropping it into a shared pool — and then using those same stolen keys to pay for the compute that ran the next round of scanning. This is not a prediction about where offensive AI is going. Amazon Threat Intelligence published the capture on November 13, 2026: its decoy sensors recorded the agents' own operating memory while the campaign was live.
Developing story — first published 08:55 CET (07:55 UTC), November 16, 2026. Updated as Amazon and the affected projects publish more.
What happened
Amazon runs a globally distributed network of decoy sensors called MadPot. For this campaign the sensors posed as popular LLM inference APIs — the chat-completions endpoints that AI gateways talk to upstream. Between October 3 and November 5, 2026, those decoys captured requests from AI agents that were carrying their full working state: persistent task context, system prompts, tool histories, knowledge-graph state, and the findings the agents had reported back to their operators.
That state told Amazon the agents were running on ARTEX, an open-source agentic penetration-testing framework. ARTEX splits a job across planner, worker, verification and compression agents that share a persistent knowledge graph; the operators set a mission, targeting rules and red lines through standing instruction prompts. Amazon attributes the activity to "disparate Chinese-nexus threat groups" with moderate confidence — simplified-Chinese prompts, China time-zone configuration, instructions that explicitly excluded mainland-China targets and government domains, and tooling associated with Chinese-nexus actors.
The important caveat, stated by Amazon and worth repeating: this is reconstructed from the agents' own records. Amazon did not watch the downstream activity happen and cannot verify the outcomes the agents claimed against real victims. What is solid is the method, because the method is what the decoys captured directly.
Who is exposed — and how to check
The agents fingerprinted a specific set of internet-facing AI software and mapped each product to a known attack chain:
| Category | Products named by Amazon |
|---|---|
| LLM gateways / proxies | One API, New API, Veloera, Sub2API, LiteLLM |
| AI application builders | Dify, FastGPT, Langflow, RAGFlow, Open WebUI, LobeChat, Ollama |
None of the techniques were new. Amazon's line is blunt: "None of the techniques in these campaigns were new. The agents succeeded where basic security hygiene was missing." The playbook was uninitialized installs, anonymous management endpoints, default admin credentials — the LiteLLM default master key among them — the isCliRequest auth bypass in the One API family, SSRF into cloud metadata through URL-fetch features, and secrets left in client-side JavaScript, source maps, debug routes and .env files. Two named CVEs were in the kit: CVE-2025-3248, the unauthenticated code-injection flaw in Langflow before 1.3.0 (CVSS 9.8), and CVE-2026-28797, a server-side template injection in RAGFlow 0.24.0 and earlier (CVSS 8.8).
If you run any of these, the exposure question is simple and testable: is the instance reachable from the internet, does it still carry a default or placeholder admin secret, and does its configuration leak a working upstream key? A build-number inventory does not answer that — the problem is reachability and configuration, not version drift.
The self-funding loop
The detail that makes this campaign different from ordinary credential theft is what the agents did with the keys. Once a key validated against its provider, it went into a managed pool — and that pool fed the framework's own model gateway. The stolen keys paid for the inference that ran the agents that hunted for more keys. Amazon's read on Campaign 1 is that the operators harvested keys "most likely so they could use those models while someone else paid for them." The economics close on themselves: the attacker's largest operating cost, token spend on token-hungry agentic work, is covered by the victims.
The key's owner does not see a breach. They see a bill. The first symptom of this compromise is a model-provider invoice that does not match anything the organization actually ran.
That is the same economic engine we wrote about in LLMjacking: stolen AI API keys funding autonomous attacks. The ARTEX campaign is the acquisition side of that market, running autonomously and at the scale of "hundreds of targets." A separate Campaign 2 from the same tooling used real-time deepfakes to defeat live selfie checks at two cryptocurrency exchanges — the same framework, pointed at KYC fraud.
Remediation
1. Am I affected? Enumerate every internet-reachable AI gateway, proxy and app-builder you run — LiteLLM, One API/New API, Dify, Langflow, RAGFlow, Open WebUI, Ollama and the rest. For each, confirm it is not reachable from the public internet without authentication, that no default or placeholder admin secret survives (rotate the LiteLLM master key; never ship the documented default), and that no upstream provider key is retrievable from its config, debug routes, source maps or client-side JavaScript. Treat any instance publicly exposed for more than a few days as already enumerated — Amazon found the agents deprioritizing keys exposed over 30 days precisely because they assume someone else got there first.
2. Patch. Langflow to 1.3.0 or later (closes CVE-2025-3248). RAGFlow to a release after 0.24.0 (closes CVE-2026-28797). Update One API-family deployments to a version that removes the isCliRequest bypass. Upgrade LiteLLM and the other gateways to current releases.
3. Can't patch now? Put every AI gateway and inference endpoint behind the same authentication, network segmentation and egress controls as any other production system. Remove public exposure first — an unauthenticated management endpoint on the internet is the whole attack. Block the SSRF path by denying app containers access to the cloud metadata service (IMDSv2, metadata-proxy deny rules).
4. Hunt for compromise. Rotate every upstream provider key that was reachable from an exposed instance, at the provider — deleting a leaked .env does not invalidate the key. Then watch the one signal the attacker cannot hide: spend and usage. Unexpected model-provider invoices, inference calls to models or regions you never use, token consumption out of hours, and identity-service calls validating your keys from unfamiliar addresses (the IOC set in Amazon's post starts at 104.28.225[.]223 and 212.107.28[.]51). Map the exposure chain to MITRE ATT&CK T1595 (active scanning), T1552 (unsecured credentials), T1078 (valid accounts) and T1190 (exploit public-facing application).
5. Eradicate + verify. After rotating keys and closing exposure, re-scan the asset from the outside to confirm the management endpoint now demands auth and no key leaks from its configuration — verify the fix the same way the attacker tested the weakness, from the internet in. Audit provider-side logs for any action taken with the old key before you rotated it.
What is not known yet
- Real-world impact is unverified. Amazon reconstructed outcomes from the agents' own claims; the number of keys actually stolen, the specific organizations hit, and what was done with the access are not independently confirmed.
- No count of victims. Amazon describes "hundreds of targets" and does not publish how many instances were successfully compromised.
- Attribution is moderate-confidence. The Chinese-nexus assessment rests on language, time-zone and tooling signals, not hard identity.
- The IOC list is partial in the public post and the providers whose keys were targeted are not individually named.
Where this leaves defenders
The uncomfortable symmetry of this campaign is that an autonomous offensive agent found your exposed AI infrastructure before you audited it, because it never stops looking and it pays for itself. The honest answer to "is my LiteLLM reachable with a default key, is my Langflow driveable to code execution" is not a version report — it is the same test the attacker ran, from the outside in.
That is what an autonomous AI red team is for. Zero Hunt runs a 10-agent swarm that fingerprints the exact product and version on your perimeter, including AI gateways and app-builders, and — black-box, the way ARTEX saw you — checks whether a default master key, an unauthenticated endpoint or an SSRF path actually turns into provider-key access, writing a working proof per environment inside an ephemeral hardened container that never touches the host. It runs on-premise on private AI — ZeroHunt's own models on the appliance in your rack — so when it points at infrastructure holding your provider keys, those keys never leave the box to a third party, and a human approves every active step. New perimeter assets trigger a campaign within the hour, which is the only cadence that matches an adversary whose agents scan continuously.
And because the first and often only symptom of a stolen key is anomalous usage, Zero Hunt's AI Traffic Analysis — a deep-learning model with four inference heads running on the appliance GPU at multi-Gbit/s — baselines your outbound AI-API traffic and flags inference calls to never-seen destinations and out-of-pattern spend while they are happening, not in next month's provider invoice. For the buyer-intent version of the exposure question — how to put automated, repeatable adversary testing in front of your AI estate — see our guide to automated penetration testing.
Is this exploitable in your environment?
Zero Hunt answers that on your own network: an autonomous AI red team on an on-premise appliance, running on private AI, black-box or gray-box, with a human approving every step that matters. Proof of what is exploitable, the fix, and signed evidence — no data leaves your perimeter.