AI Agents Are Now Hacking AI Apps: Amazon Uncovers ARTEX Campaign Stealing API Keys from LiteLLM, Dify and More

Quick Answer

Amazon’s threat intelligence team has uncovered a campaign in which attackers used AI agents to hunt for internet-exposed AI applications — including LiteLLM, Dify, One API, Langflow and RAGFlow — and steal the AI provider API keys stored inside them. The agents verified the stolen keys, added them to a shared pool, and then used those keys to run the very models that powered the search for more keys. The FBI has separately warned that the open-source AI penetration-testing framework ARTEX, which Amazon assesses with moderate confidence powered this campaign, has been used by a range of attackers since at least August 2026. If you self-host any AI gateway, chatbot builder or model proxy, treat it like a production system: change default credentials, put it behind authentication, and rotate any key that was ever exposed.

Introduction

For years, security teams worried about what AI could do in the hands of attackers. That worry has now turned into a documented campaign — and the targets are AI systems themselves.

Amazon Threat Intelligence revealed this week that it captured the working records of attacker-controlled AI agents that spent weeks scanning the internet for exposed AI applications. The agents were not guessing. They followed a written playbook of known entry points for each product, probed default administrator credentials, unfinished installations and known vulnerabilities, and pulled out the API keys those applications hold for providers like OpenAI, Anthropic and Google. Then, in a detail that captures the strangeness of this moment, the stolen keys were used to pay for the AI models that ran the agents doing the stealing.

The campaign is not a single incident. Microsoft reported last week that similar agentic tools were being used to hunt secrets on GitHub. Cloudflare’s incident responders spent the past eight weeks on multiple investigations involving the same framework. And the FBI issued a FLASH alert this week warning that attackers across many sectors have been using it since at least August. The framework at the centre of all of this is ARTEX, an open-source AI tool built for penetration testing — a legitimate security tool that has been pulled from GitHub but lives on through forks, archived copies and a commercial edition.

This article explains what happened, which products were targeted, how the agents worked, and exactly what to check if you run any of these tools.

What Amazon Actually Found

Amazon’s team did not watch the attacks happen live. It captured them through MadPot, a network of decoy servers designed to look like popular large language model services. Between October 3 and late last week, attacker agents sent requests to those decoys that often carried a campaign’s full history — the operators’ instructions and the agents’ own reported findings, bundled into the requests themselves.

That is how the picture emerged. The records describe work done on systems MadPot does not monitor, so Amazon is careful about what it can and cannot prove. “Amazon Threat Intelligence 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,” the team said. Even with that caution, the pattern is consistent and detailed: hundreds of targets across AI app platforms and other systems, a shared pool of stolen keys, and a playbook that reads like a checklist.

Amazon assessed, with moderate confidence, that the agents ran on ARTEX. It also assessed that the operators were separate China-linked groups, citing Simplified Chinese prompts and China time zone settings among other evidence. AWS customers who may have been affected have been notified.

Which Apps Were Targeted — and Why These Ones

The records name a long list of targets, and the list is instructive. The agents focused on applications that hold keys for many providers, because one weak admin page in such a system can expose many accounts at once.

The named targets include:

  • LLM gateways and proxies: One API, New API, Veloera, Sub2API and LiteLLM
  • AI app builders and frameworks: Dify, FastGPT, Langflow, RAGFlow, Open WebUI, LobeChat and Ollama

These are popular open-source tools. LiteLLM lets teams call more than a hundred different models through one interface. Dify and Langflow let people build AI applications with visual workflows. One API and its relatives act as a single front door for many providers’ keys. That is precisely the point: a gateway that centralises your keys is convenient, but if it is exposed to the internet without authentication, it centralises your risk too.

The playbook the agents followed covered the obvious weaknesses first. It listed default administrator credentials, such as LiteLLM’s default master key. It listed unfinished installations that an outsider could complete and take over. It listed known flaws in Langflow and RAGFlow. And it covered subtler routes in: management and provider-settings endpoints that need no login, an authentication bypass through the isCliRequest header in One API family systems, and server-side request forgery through URL-fetch features that could reach cloud metadata services. Secrets left in client-side JavaScript, source maps, debug routes and environment files were on the list as well.

When the agents found cloud credentials, they went after managed services that host AI models, secret stores and application identities — and they prioritised premium AI models over general cloud access. The keys were not trophies. They were fuel.

How an AI Agent Runs a Hacking Campaign

ARTEX works the way agentic tools generally work. An operator gives it a target and a goal. A planner agent splits the goal into tasks. Worker agents run security tools to carry those tasks out. To decide each next step, the agents send their work to a large language model and act on what comes back.

That structure matters because it changes the economics of attacking. Amazon’s team put it plainly: “None of the techniques in these campaigns were new. What AI agents change is the speed and persistence of the attacker.” Every technique in the playbook — default passwords, exposed endpoints, unpatched software, secrets in code — is an old failure. The agents simply never get tired, never lose focus, and can work through hundreds of targets in parallel.

To find leaked keys, the agents used internet scanning services and certificate transparency logs, and searched GitHub repositories and event archives, npm and PyPI packages, container image layers, notebooks, model-hosting spaces, paste sites and Telegram channels. It was a wide net, cast continuously.

There was also a second campaign in the same captured records. In it, agents attempted to bypass identity checks at two cryptocurrency exchanges using deepfakes. One verification vendor’s server rejected the live deepfake video on every attempt the agents made to record it. Amazon did not say whether forged photos of ID documents that the agents also fabricated passed document checks. The episode is a reminder that these tools are being pointed at more than servers.

The FBI Warning and the Cloudflare Cases

The FBI’s FLASH alert this week ties the picture together. It says a range of attackers have used ARTEX since at least August against organisations in many sectors around the world, summarising 11 earlier reports. The alert’s examples include an earlier campaign against South Korean financial institutions that stole personal information on about 67,000 people, and the ConnectWise compromise.

ARTEX’s developer made its GitHub repository unavailable on October 8, after reports of abuse. That did not end its availability: community forks, archived copies and a commercial version called ARTEX PRO keep it in circulation.

Cloudflare’s experience shows what the tool looks like in a live environment. Over the past eight weeks, its incident responders were called into multiple investigations involving ARTEX and tools built from it. In more than one incident, an attacker gained access to a customer’s environment with a major cloud provider and moved directly into the customer’s Cloudflare account. The common root cause was static CI/CD tokens that never expired, granting broad access across the customer’s cloud setup.

In one case reported this week, ARTEX gained access through a compromised API token that had been used for CI/CD. The token had no IP restrictions or rate limiting. What followed included 400 database dump requests in an hour; Cloudflare has not said whether those requests returned any data. New Worker scripts appeared in the account with names such as artex-*, artex-pgrecon-*, artex-pgw-* and artex-do-*, each name matching a different task. Activity ran at more than 69 requests per minute across several parts of the account, including attempts to establish persistence and validate session tokens for other third-party apps. Much of it was lightly guided by a human operator. Whether any persistence attempt worked has not been disclosed.

The scale is striking: over three days this week, more than 50 families of AI penetration-testing frameworks tried to scan Cloudflare’s customers, and the IP addresses seen running such frameworks now number in the thousands.

Microsoft’s reporting adds another thread. Last week it said attackers were using agentic AI tools such as ARTEX for GitHub secret hunting, looking for exposed credentials that included API keys for AI inference. On August 26, it described an earlier RAGFlow attack in which a hidden hook captured AI provider keys as users entered them, and a compromise of a LiteLLM gateway that exposed provider keys.

The Known Flaws in the Playbook

Two vulnerabilities named in the playbook deserve attention from anyone running these products:

  • Langflow — CVE-2025-3248. A missing authentication flaw that lets a remote attacker run code. Versions before 1.3.0 are affected; 1.3.0 is the fixed version. CISA added the flaw to its Known Exploited Vulnerabilities (KEV) catalog on May 5, 2025, after earlier exploitation, and the KEV entry marks it as known to be used in ransomware campaigns.
  • RAGFlow — CVE-2026-28797. A server-side template injection flaw that lets any logged-in user run operating system commands on the server. The catch is that self-registration is on by default, so getting an account is trivial. NVD lists version 0.24.0 and earlier as affected. The advisory lists no patched version, but version 0.25.0, released on April 21, renders templates in the sandbox the advisory recommends.

The One API family authentication bypass through the isCliRequest header has no affected versions or fix named in Amazon’s report, which makes checking your own deployment — rather than waiting for a patch note — the right move.

What to Do If You Run Any of These Tools

This is the practical part, and it follows directly from Amazon’s recommendations and the FBI’s advice. None of it requires new tools. It requires treating AI applications with the same discipline as any other production system.

1. Change every default credential, and finish every installation

Change default administrator credentials — LiteLLM’s default master key is named explicitly in the playbook. Do not leave a new installation unfinished where an outsider could complete the setup and take it over. If you installed something for a quick test months ago and forgot about it, that forgotten instance is exactly what these agents are built to find.

2. Put authentication in front of everything

No AI gateway, model proxy, admin page or inference endpoint should be reachable from the internet without authentication. Check management and provider-settings endpoints specifically: the playbook targeted endpoints that need no login. If your app has a setting that disables self-registration, turn self-registration off.

3. Hunt for exposed secrets, then rotate them

Search configuration files, environment variables, deployment scripts, CI/CD pipelines and databases for embedded secrets. Keep scanning repositories and container images for exposed ones. And rotate any credential that was ever exposed — quickly, as the FBI advises. A key that leaked once should be treated as compromised, even if you cannot see any misuse. Watch for unexpected spending or unusual usage on your AI provider accounts: a stolen key being used to run models shows up on the bill.

4. Give tokens an expiry date and limit where they work

Give Cloudflare API tokens an expiry date and restrict the client IP addresses that can use them. The same principle applies everywhere: tokens that never expire and work from anywhere are the root cause Cloudflare kept finding. New Cloudflare tokens carry a cfut_ prefix that secret scanners can detect — use that to your advantage when scanning your own code.

5. Check your logs for the campaign’s fingerprints

Look for Cloudflare Worker scripts named artex-*, artex-pgrecon-*, artex-pgw-* or artex-do-*. Check logs for the 11 IP addresses published with Amazon’s decoy findings, and for the more than 2,500 addresses that researchers at Cisco Talos link to ARTEX. Cisco Talos has also published detection rules: Snort 3 rules 7:76, 7:77 and 7:78, and Snort 2 rules 1:67494, 1:67495 and 1:67496. Note that rules 7:78 and 1:67496 are off by default and detect traces of norma, the agent harness ARTEX uses.

6. Patch Langflow and RAGFlow now

If you run Langflow, upgrade to 1.3.0 or later. If you run RAGFlow, move to 0.25.0 or later and disable self-registration. Then check whether anything in your deployment still exposes provider keys through client-side JavaScript, source maps or debug routes — the playbook looked for all of those.

Related: PostgreSQL Patches 22-Year-Old Flaw Enabling Authenticated RCE — read how fast patching stopped a similar threat.

Why This Campaign Is a Turning Point

There have been automated attacks for decades. Botnets scan the internet constantly. What is different here is the combination of autonomy and judgement. These agents did not just scan; they read a playbook, chose entry points per product, verified stolen keys, pooled them, and reinvested them into more attacks. A human operator gave a goal and the agents did the rest, lightly guided.

That is why the usual advice — patch, rotate keys, restrict tokens — still applies, but the margin for leaving things half-done has shrunk. A forgotten test deployment of Dify or LiteLLM used to be a risk in theory. Now it is a target in an automated queue, and the queue is being worked through by software that does not sleep. The defences that stopped these agents were basic ones: credentials that were not defaults, endpoints that required login, software that was patched, tokens that expired. The agents succeeded, in Amazon’s words, where basic security was missing.

For regular users, the lesson is narrower but real. If you use AI apps and services, your risk is mostly indirect — a provider whose keys are stolen may pass on the cost, or an AI service you rely on may go down or behave strangely while its keys are abused. Keep an eye on your own API bills if you hold keys, and prefer services that publish how they protect their infrastructure.

The same week this campaign surfaced, law enforcement was also taking down the infrastructure behind older threats — in Operation Endgame, police seized the servers behind Gootloader, CastleRAT and StealC and recovered 6.4 million stolen logins. Attackers adapt, and the tools change, but the pattern repeats: the newest threats still walk through the oldest open doors.

Frequently Asked Questions

What is ARTEX?

ARTEX is an open-source AI framework for penetration testing. An operator gives it a target and a goal, a planner agent splits the goal into tasks, and worker agents run security tools, using a large language model to decide each next step. Its developer removed the GitHub repository on October 8, 2026, after reports of abuse, but forks, archived copies and a commercial edition called ARTEX PRO remain available. The FBI says a range of attackers have used it since at least August 2026.

Which AI apps were targeted in this campaign?

The captured records name LLM gateways and proxies including One API, New API, Veloera, Sub2API and LiteLLM, and AI app builders including Dify, FastGPT, Langflow, RAGFlow, Open WebUI, LobeChat and Ollama. The agents focused on apps that hold keys for many providers, because one weak admin page there can expose many accounts.

How did the AI agents steal the API keys?

They followed a playbook of known entry points: default administrator credentials such as LiteLLM’s default master key, unfinished installations an outsider could take over, known flaws in Langflow and RAGFlow, an authentication bypass through the isCliRequest header in One API family systems, server-side request forgery through URL-fetch features, and secrets left in client-side JavaScript, source maps, debug routes and environment files. Stolen keys were verified, pooled, and used to run the models powering the search for more keys.

Am I affected if I only use ChatGPT or Claude through their official apps?

No, not directly. This campaign targeted self-hosted, internet-exposed AI applications — gateways, proxies and app builders that organisations run themselves. If you only use official apps and websites, your risk is indirect. If you or your team self-host any of the named tools, check them now.

What should I check first on my own AI deployment?

Start with the basics: change all default credentials, make sure no admin page or inference endpoint is reachable without authentication, disable self-registration, patch Langflow to 1.3.0+ and RAGFlow to 0.25.0+, search your code and configs for embedded secrets and rotate anything exposed, and give API tokens expiry dates and IP restrictions. Then check logs for the campaign’s fingerprints, such as artex-* Worker scripts and the published IP lists.

How can I tell if my API keys were stolen?

Watch for unexpected spending or unusual usage on your AI provider accounts — a stolen key being used to run models shows up on the bill. Check your provider’s usage dashboard for models, regions or times you do not recognise. If in doubt, rotate the key. Rotation is cheap; a compromised key funding someone else’s campaign is not.

Key Takeaways

  • Amazon captured the working records of AI agents that stole API keys from internet-exposed AI apps — LiteLLM, Dify, One API, Langflow, RAGFlow and others — and used the stolen keys to power further attacks.
  • The agents likely ran on ARTEX, an open-source AI penetration-testing framework. The FBI warns attackers have used it since at least August 2026; its GitHub repo was pulled on October 8, but forks and a commercial edition remain.
  • Every technique in the playbook was an old one: default credentials, unfinished installs, unpatched flaws, exposed endpoints and secrets in code. AI agents change the speed and persistence, not the techniques.
  • Cloudflare saw the same framework used with stolen CI/CD tokens, including 400 database dump requests in an hour, and more than 50 families of AI pentesting frameworks scanned its customers in three days.
  • If you self-host AI tools, the fix is basic security done properly: change defaults, require authentication everywhere, disable self-registration, patch now, rotate exposed keys, and give tokens expiry dates and IP limits.

Conclusion

The ARTEX campaign is a preview of what attacks look like when the attacker is software. The agents that Amazon caught were not doing anything a skilled human could not do — they were doing it faster, at greater scale, and without stopping. They found the same doors that have always been open: a default master key nobody changed, a test install nobody finished, an endpoint nobody put behind a login, a token that never expired.

That is also the reassuring part. The defences that work are the ones security teams already know. Close the defaults, finish the installs, patch the software, rotate the keys, expire the tokens. Do the basics, and the most advanced attacker in this campaign — an AI agent with a playbook and a stolen budget — finds nothing to work with. Leave the basics undone, and it will find your keys, spend them, and come back for more.

Source: The Hacker News, “Amazon Uncovers AI Agent Campaign Targeting LiteLLM, Dify, and Other Apps for API Keys” (November 16, 2026).

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top