Fe/male Switch
Startup Playbook: success through failure

Stolen AI API Keys: How ARTEX Agents Hunt Them and How Freelancers and Small Teams Lock Theirs Down

Stolen AI API keys: how ARTEX agents hunt them and how freelancers and small teams lock them down
TL;DR: How do stolen AI API keys get found, and how do you protect yours?

Between 3 October and 5 November 2026 Amazon watched ARTEX AI agents hunt AI API keys in self-hosted apps such as Dify, Open WebUI, Ollama and LiteLLM, in browser code, env files, GitHub and Telegram, and the stolen keys paid for the agents' own work. Keys public for more than 30 days counted as low-value, so fresh leaks are the prize. Use one key per project, keep keys out of browser code, set spend limits and rotate a leaked key the same day.
Stolen AI API keys are the fuel of the ARTEX hacking wave, and MeanCEO explains what ARTEX AI is and what the FBI found if you need the basics first. For a non-technical owner's version, the Fe/male Switch Foundation has a small business checklist against AI hacking tools. This guide is for freelancers, solo founders and small teams who paste OpenAI, Anthropic or other AI API keys into no-code tools, websites, scripts and self-hosted AI apps.

How did ARTEX agents turn stolen AI API keys into free fuel?

ARTEX is an open-source framework whose AI agents turn a plain-language goal into machine commands, says the FBI FLASH alert of 13 November 2026. It has no model of its own, so every run calls an outside AI model through an API key, and somebody pays for every call.
Amazon's MadPot sensors are decoys built to look like popular AI model APIs. From 3 October to 5 November 2026 they caught ARTEX agents sending their own campaign memory: system prompts, tool histories and their shared map of targets. The Amazon Threat Intelligence report of 13 November links the activity, with moderate confidence, to separate Chinese-nexus groups.
Amazon calls Campaign 1 industrial-scale theft of credentials for AI models, and it ran itself: stolen keys paid for the AI inference that powered the next round of credential hunting. Your key can end up paying for the attack on the next freelancer. The agents preferred keys for premium frontier models over general cloud permissions. Outside scripts are the other weak spot on client sites, and a Content Security Policy limits where a hijacked script can send data, as the Optimizely hack showed.
How stolen AI API keys fund the next theft in Amazon's ARTEX Campaign 1: agents search scanners, certificate logs, GitHub, npm, PyPI, paste sites and Telegram, break into unclaimed installs and default master keys, grade keys L1 to L3, and spend the stolen key on their next round of hunting
Campaign 1 in four steps, from Amazon's report of 13 November 2026.

Which AI apps did the attackers target?

Amazon named two groups of software that store AI API keys for their users, so one break-in hands over many keys.
TypeApps Amazon namedWhy attackers want them
LLM gateways and proxiesOne API, New API, Veloera, Sub2API, LiteLLMOne gateway holds the keys for every model a team uses
AI app builders and chat appsDify, FastGPT, Langflow, RAGFlow, Open WebUI, LobeChat, OllamaAdmin pages store model keys, and open endpoints give away model use
The playbook itself was old-fashioned. The agents looked for:
  • Unclaimed fresh installs: nobody created the first admin account, so the first visitor can.
  • Open admin pages that answer without a login, and default credentials such as the default LiteLLM master key.
  • Known holes: CVE-2025-3248 in Langflow, CVE-2026-28797 in RAGFlow, and an isCliRequest header trick that skips the login in the One API family.
  • SSRF (server-side request forgery): tricking the app into fetching its cloud server's metadata, where credentials sit.
  • Secrets in the open: keys in client-side JavaScript, source maps, debug pages and env files.
The classic case is the weekend demo: Open WebUI or Dify on a cheap server, your OpenAI key pasted in, the admin account unclaimed and the default settings untouched. That server matches what Campaign 1 hunted. Small firms get hit through the apps nobody watches, as our Cathedral Anthropic app check for small firms showed.

Where do attackers find leaked AI API keys?

Amazon lists the places the agents searched: internet scanners, certificate transparency logs (the public record of new HTTPS certificates, which reveals new subdomains), GitHub repositories and GitHub event archives, npm and PyPI package tarballs, container image layers, notebooks, model-hosting spaces, paste sites and Telegram.
Where the key livesRiskFix
Website or app code that runs in the browserHigh: anyone can read the sourceCall the AI provider from your server or a serverless function
GitHub repo, public now or once publicHigh: history keeps deleted keysRevoke the key first, then clean the history
Env file on a server or in a project folderHigh if the web server can serve itBlock it from the web and keep it out of Git
Self-hosted AI app (Open WebUI, Dify, LiteLLM, Langflow)High if unclaimed, unpatched or on defaultsClaim the admin, change defaults, patch, put it behind a login
Docker image or npm/PyPI package you publishedHigh: every layer and tarball can be unpackedPass keys in at runtime, never build them in
No-code automation tool (Make, Zapier, n8n)Medium: exposed in screenshots and shared copiesOne key per client, stored only in the tool's connections
Telegram chat, paste site or client emailHigh: attackers search theseShare keys only through a password manager

Why does a fresh leak matter more than an old one?

The agents graded every credential: L1 was a lead, L2 a working API call and L3 a key with quantified impact. Keys that had been public for more than 30 days went into the low-value pile.
The agents filed old leaks as stale stock, and a key you pushed this morning still works. So the first hours after a leak decide what it costs you, and rotation speed beats every other fix in this guide. Amazon puts it this way: "None of the techniques in these campaigns were new. What AI agents change is the speed and persistence of the attacker."
The bills are real. At the hosting platform Railway, stolen customer AI-service credentials generated an estimated $740,000 in unauthorized compute in October, according to Barracuda's account of a machine-speed intrusion; MeanCEO covered the Railway and LiteLLM breach at the time. Barracuda's own intrusion started with a cloud access key it had given an AI vendor for an earlier project and never retired. Its verdict: "That is on us." Our Ogi Networks breach guide for freelancers draws the same lesson: logins and keys outlive the project unless someone closes them.
Stolen AI API keys in numbers: $740,000 in unauthorized compute from stolen customer AI keys at Railway, 12 AI gateways and app builders named as targets by Amazon, keys public for more than 30 days rated low-value, and more than 1,600 exposed ARTEX consoles online in early November 2026
Four numbers from the ARTEX reports of November 2026.

How do you run a 30-minute AI API key check?

Set a timer and run it once for your own business, then once per client project.
  1. List every key (5 minutes) on the API key page of each AI provider you pay, with where it runs. Delete keys nobody can explain.
  2. Search your code (5 minutes) for "sk-" (OpenAI and Anthropic keys both start with it) and committed env files, in old and archived repositories too.
  3. Open your live site (5 minutes) and search its page source and network tab for your key. If it shows up there, everyone can see it.
  4. Walk through each self-hosted AI app (5 minutes): admin account claimed, default master key changed, version current, admin page behind a login?
  5. Unpack what you published (3 minutes) to npm, PyPI or a public container registry and look for keys and env files.
  6. Scan chats and docs (2 minutes) in Telegram, Slack, email and handover documents for pasted keys.
  7. Set limits (5 minutes): a monthly spend limit and usage alerts in each provider's billing settings.
The 30-minute AI API key check for freelancers and small teams: list every key at every AI provider, delete keys nobody can explain, search repos for sk- and env files, search your live site's code for keys, claim admin on self-hosted AI apps, change default passwords and master keys, update Langflow, RAGFlow and gateways, set spend limits and usage alerts
Print it, set a timer, and run it per client.

How do you keep AI API keys safe in daily work?

  • One key per project and per client, named after the project. A leak then costs you one key, and the usage page shows which project ran up the bill.
  • Never in browser code. Call the AI provider from your server, a serverless function or your no-code tool's backend.
  • Spend limits and alerts in each provider's billing settings. Amazon advises watching for unexpected AI spend or unusual usage, and a limit caps what a stolen key can burn.
  • AI apps count as production. Amazon says to bring AI apps, model gateways and inference endpoints under production controls, and the FBI says admin interfaces belong on trusted networks only.
  • No forever tokens. Cloudflare's incident write-up describes attackers repeatedly stealing static, non-expiring tokens from build pipelines. Set expiry dates and IP limits wherever the provider offers them.
  • Retire keys at handover: revoke the keys you made for the project, and leave the client with keys under their own account.
Put these rules in our one-page AI usage policy template, and check which apps an assistant may touch with our Claude Duet setup guide. If you sell website care, add the key check to the monthly plan from our PHP vulnerability guide for freelancers.

What should you do if an AI API key was stolen?

  1. Revoke it now at the provider, without waiting for proof of theft.
  2. Create a new key for that one project and update every app that used the old one.
  3. Check usage and the bill for spikes, unknown models and calls at odd hours, and ask the provider's support about charges you didn't make.
  4. Find the leak (a commit, a page, a package, a chat) and close it.
  5. Tell the client the same day if the key or the account was theirs: what leaked, when, and what you changed.
  6. Report it: in the US to a local FBI field office or ic3.gov, elsewhere to your national cybercrime service.
For the wider basics, read our cybersecurity guide for women-led startups. For keys saved in AI coding tools, see MeanCEO's guide to rotating keys after the OpenCode breach.
Turn your skills into your first startup

The Fe/male Switch startup game takes you from idea to first paying customers in weekly quests, with an AI co-founder and a community of founders.

👉 Start the game

FAQ: stolen AI API keys

What is ARTEX?

An open-source AI hacking framework written in Go, released on GitHub in July 2026. The developer pulled the repository on 8 October 2026, and forks and copies still spread.

Does deleting a leaked key from GitHub fix the leak?

No. The agents searched GitHub repositories and GitHub event archives, so a deleted key still counts as leaked. Revoke it at the provider and create a new one.

How do I know if my AI API key was stolen?

Look for usage or spend you can't explain on the provider's usage page. Amazon advises watching for unexpected AI spend, and usage alerts flag it for you.

More on this story

About the Author

Violetta Bonenkamp, also known as MeanCEO, is an experienced startup founder with an impressive educational background including an MBA and four other higher education degrees. She has over 20 years of work experience across multiple countries, including 5 years as a solopreneur and serial entrepreneur. Throughout her startup experience she has applied for multiple startup grants at the EU level, in the Netherlands and Malta, and her startups received quite a few of those. She’s been living, studying and working in many countries around the globe and her extensive multicultural experience has influenced her immensely.
news
Made on
Tilda