// threat intel

Amazon Decoys Caught AI Agents Hunting LLM Gateway API Keys

Terminal-style cover showing AI agents harvesting LLM gateway API keys from exposed LiteLLM and RAGFlow apps

Amazon's MadPot decoy servers logged attacker AI agents hunting LLM gateway API keys in LiteLLM, One API, Dify, Langflow, RAGFlow and other internet-exposed AI apps between October 3 and mid-November 2026, in records covering hundreds of targets. If your firm runs a self-hosted gateway or AI app builder with a reachable admin page, a default master key or an unpatched Langflow or RAGFlow, it matches the target profile. Amazon could not confirm which thefts succeeded, so the answer sits in your own logs and provider bills.

Key takeaways

  • Amazon's MadPot decoys logged AI agents hunting LLM gateway API keys in exposed AI apps from October 3 to mid-November 2026; Amazon could not verify the outcomes.
  • Entry points were old: default master keys, open admin and settings APIs, Langflow CVE-2025-3248, RAGFlow CVE-2026-28797 and the One API isCliRequest bypass.
  • ARTEX and China-linked attribution are both moderate confidence; Talos Snort rules 7:78 and 1:67496 ship disabled and should be enabled.
  • Cloudflare traced ARTEX-linked intrusions to static, never-expiring CI/CD API tokens; replace them with short-lived federated credentials.

What did Amazon's MadPot decoys record?

MadPot recorded the agents’ own working notes. Amazon’s decoy servers posed as popular LLM services, and when attacker agents called them, the requests often carried the full campaign history: the operator’s instructions plus what the agent said it had already found. Collection ran from October 3, 2026 until roughly November 12 or 13. Amazon published on November 16.

Every history pursues one goal: find an exposed AI application, pull out the model-provider API keys inside it, check that each key works, and add it to a shared pool. Stolen keys paid for the model calls that drove the search for more keys, a variation on the LLMjacking cloud bills pattern.

The records cover hundreds of targets across AI app platforms and other systems, and Amazon has notified AWS customers who may have been affected.

Amazon could not verify any outcome. The intrusions happened on systems MadPot does not watch; the team says it “did not observe that activity as it happened and cannot verify the outcomes the agents reported, but the records show what the actors were pursuing.” An agent writing “key extracted, valid” may be accurate, inflated or inventing. A working key proves only that it worked at that moment, not that customer data left or a foothold remains.

Why one exposed LLM gateway hands over every provider key

Attackers go after gateways because a gateway stores many keys. LiteLLM or One API sits in front of several model providers so developers can switch models without touching application code, and every upstream credential lives in its configuration. Break one admin page and you collect the whole set.

The records name two groups of targets:

  • Gateways and proxies: One API, New API, Veloera, Sub2API and LiteLLM.
  • App builders and chat front ends: Dify, FastGPT, Langflow, RAGFlow, Open WebUI, LobeChat and Ollama.

Many start life as a proof of concept on a cloud VM with a public IP and no change ticket. In Cyprus fintech and iGaming we keep seeing an internal chatbot pilot running through a gateway that also holds production keys for the customer-facing assistant.

When agents found cloud credentials, they went for managed services hosting AI models, secret stores and application identities, ranking premium models above general cloud access. The prize was expensive inference.

Discovery went well beyond port scanning. Agents pulled targets and leaked keys from internet scanning services, certificate transparency logs, GitHub repositories and event archives, npm and PyPI packages, container image layers, notebooks, model-hosting spaces, paste sites and Telegram channels. Certificate transparency is the subtlest: every certificate for a host like dify-staging.yourfirm.com is public, so defenders can query the same logs to find their own forgotten staging boxes.

Which old mistakes did the agents reuse?

Amazon says it plainly: “None of the techniques in these campaigns were new. What AI agents change is the speed and persistence of the attacker.” The agents succeeded where basics were missing. The per-product entry points fall into six groups:

  • Default admin credentials. LiteLLM’s default master key is the named example. If nobody changed it, the agent becomes the admin.
  • Unfinished installs. Open setup flows let an outsider take over the instance.
  • Open management APIs. Management and provider-settings endpoints that hand configured keys to anyone who asks, no login needed.
  • The One API isCliRequest bypass. A request-header authentication bypass in One API family systems. Amazon names no affected versions or fix, so treat every exposed One API, New API or derivative as suspect.
  • SSRF to cloud metadata. URL-fetching features pointed at the metadata service to obtain instance credentials.
  • Client-side secrets. Keys in JavaScript bundles, source maps, debug routes and environment files.
Flaw Impact Affected Status
Langflow CVE-2025-3248 Missing authentication, remote code execution Before 1.3.0 Fixed in 1.3.0; in CISA KEV since May 5, 2025, marked as used in ransomware campaigns
RAGFlow CVE-2026-28797 Server-side template injection; any logged-in user can run OS commands 0.24.0 and earlier (per NVD) Advisory names no patched version; 0.25.0 (released April 21, 2026) renders templates in the sandbox the advisory recommends
One API family isCliRequest Authentication bypass Not named No fix named

“Any logged-in user” sounds like a limit until you remember RAGFlow’s self-registration is on by default: the attacker signs up, logs in and runs commands. Move to 0.25.0 and switch off open sign-up.

How solid is the ARTEX and China-linked assessment?

Both attribution calls are moderate confidence. Amazon assesses that the agents ran on ARTEX, an open-source AI penetration-testing framework, and that the operators were separate China-linked groups, citing Simplified Chinese prompts and China time-zone settings among other indicators.

The ARTEX design explains why MadPot saw so much. A planner agent splits the operator’s goal into tasks for worker agents that run security tools, and the agents ask an LLM to decide each next step. Point that traffic at a decoy posing as an LLM service and the decoy reads the whole plan.

Language and time-zone settings are easy to fake, and “separate groups” suggests one tool used by several crews. The entry points stay the same either way.

Pulling ARTEX offline has not stopped it. Its developer made the GitHub repository unavailable on October 8, 2026 after abuse reports, but forks, archived copies and a commercial ARTEX PRO keep it in circulation. We covered an earlier case in ARTEX AI data theft in South Korea.

Detection content exists, with limits:

  • 11 IP addresses published with Amazon’s decoy findings.
  • More than 2,500 ARTEX-linked addresses in Cisco Talos indicator files.
  • Talos Snort 3 rules 7:76, 7:77 and 7:78, and Snort 2 rules 1:67494, 1:67495 and 1:67496. Rules 7:78 and 1:67496 ship disabled and detect traces of norma, the agent harness ARTEX runs on. Turn them on.

Do not build the response on blocklists. Over three days in mid-November, Cloudflare saw more than 50 families of AI pentest frameworks scan its customers, and the addresses running them number in the thousands.

What did Cloudflare, the FBI and Microsoft add?

Cloudflare’s evidence concerns CI/CD tokens. Over eight weeks its incident responders worked multiple intrusions involving ARTEX and derived tools; in more than one, the attacker entered a customer’s environment at a major cloud provider and moved straight into the customer’s Cloudflare account.

The common root cause was static CI/CD tokens that never expired and granted broad access. In the ARTEX case, the stolen credential was an account-level CI/CD API token with no IP restriction and no rate limiting, most likely compromised through a third-party cloud provider. How it was first stolen has not been disclosed.

What followed was loud and lightly guided by a human: 400 database dump requests in one hour, more than 69 requests per minute, persistence attempts, and attempts to validate session tokens for other third-party apps. Cloudflare has not said whether data came back or persistence held. New Worker scripts were named artex-*, artex-pgrecon-*, artex-pgw-* and artex-do-*, a ready-made hunting query.

The FBI’s FLASH alert summarizes 11 earlier reports and describes no new incident. It places ARTEX in use since at least August 2026, citing a campaign against South Korean financial institutions that took personal information on about 67,000 people, and the ConnectWise compromise.

Microsoft reported the week before that attackers used agentic tools such as ARTEX to hunt GitHub for exposed credentials, including AI inference keys. Its August 26 case study described a hidden hook in RAGFlow capturing provider keys and a compromised LiteLLM gateway exposing them, without linking either to ARTEX.

A deepfake KYC campaign in the same data

The decoy records also held agents trying to pass identity verification at two unnamed cryptocurrency exchanges with deepfakes. One verification vendor’s server rejected the live deepfake video every time; Amazon did not say whether the forged ID photos passed document checks. Cyprus CASP and EMI onboarding teams should check whether their logs would show repeated liveness failures tied to one document or device.

What should you do if LiteLLM, Dify or One API faces the internet?

Find every instance, close the admin plane, and rotate everything the gateway held.

  1. Inventory. Search certificate transparency logs, cloud accounts and DNS for the products named above, including pilots and staging. An external network penetration test finds the forgotten ones faster.
  2. Close the admin plane. Put management interfaces behind a VPN or an identity-aware proxy. Replace LiteLLM’s default master key. Disable open self-registration on RAGFlow, Dify and similar tools.
  3. Patch. Langflow to 1.3.0 or later, RAGFlow to 0.25.0 or later. For One API family systems with no named fix, remove public exposure.
  4. Rotate downstream keys. Rotating the gateway master key leaves provider keys valid. Rotate every key the gateway held and review provider usage, billing and key-creation records from October 3 onward.
  5. Cut SSRF paths. Enforce IMDSv2 on AWS and restrict outbound traffic from URL-fetching apps; IMDSv2 alone does not replace egress control.
  6. Replace static CI/CD tokens with OIDC or workload-identity federation issuing short-lived credentials scoped to repository and branch. Where Cloudflare API tokens must stay, set an expiry and restrict client IPs; new tokens carry a cfut_ prefix secret scanners can detect. Search for artex-named Workers.
  7. Preserve evidence first. Export cloud audit logs, CI/CD variable history, Cloudflare audit events and Worker code before revoking. Revocation stops future use; it does not show what was read.

Practitioner’s note: teams scope the customer chatbot and leave out the LiteLLM or One API instance behind it because “it’s just a proxy”. We regularly find its admin UI on a public port, a shared master key, and provider keys readable through a settings endpoint. Scope the gateway as a secrets broker in your next LLM application penetration test.

When do stolen LLM gateway API keys become a NIS2 or DORA issue?

An exposed gateway can start a reporting clock before you know what the attacker did. NIS2 requires an early warning within 24 hours of becoming aware of a significant incident, a notification within 72 hours and a final report within one month; Cyprus entities should confirm which national authority and procedure apply.

Significance depends on impact: unauthorized spend, disruption, or access to data that passed through the gateway. If it stores prompt logs with customer messages or documents, key theft also becomes a GDPR question, with notification within 72 hours where individuals face risk.

DORA, applied since January 17, 2025, adds the supplier angle for CIFs, EMIs and payment firms. Model providers, the CI/CD platform, the cloud provider and the KYC vendor can sit in one incident chain, and your register of information should list them. Our NIS2 and DORA compliance readiness review maps these dependencies.

What is still unknown

  • Which keys the agents actually stole, and whether any were used.
  • Affected versions and a fix for the One API isCliRequest bypass.
  • Whether RAGFlow 0.25.0 fully closes CVE-2026-28797.
  • How the Cloudflare token was first stolen, and whether the dump requests returned data.
  • The full evidence behind the China-linked assessment.

FAQ

What did Amazon find with MadPot about AI agents stealing API keys?

Decoys posing as LLM services captured attacker agents' campaign histories from October 3 to mid-November 2026, showing agents extracting, validating and pooling provider keys. Amazon could not verify the outcomes the agents reported.

Which AI apps were targeted for LLM API key theft?

The gateways One API, New API, Veloera, Sub2API and LiteLLM, plus Dify, FastGPT, Langflow, RAGFlow, Open WebUI, LobeChat and Ollama.

Does Langflow CVE-2025-3248 allow unauthenticated remote code execution?

Yes, in versions before 1.3.0, which fixes it. CISA added it to the KEV catalog on May 5, 2025.

What should companies do if LiteLLM or Dify is exposed to the internet?

Preserve logs, move the admin interface behind a VPN or identity-aware proxy, replace default keys and disable open sign-up. Then rotate every provider key the instance held and review billing from October 3 onward.

If you run a self-hosted gateway, RAG pipeline or AI app builder, we can test it the way these agents would, admin plane and stored keys included. See our AI LLM security testing in Cyprus.


// get started

Work with CyprusPentest

Tell us about your target and goals. We’ll reply with scope and a fixed-price quote — usually within one business day.

./request_engagement