Gold key icon on a dark blue background with the headline Planted AI Prompt Keys Got Stolen, illustrating API keys in AI prompts being leaked

Researchers Planted Fake API Keys in 2 Million AI Prompts, and Attackers Stole Them Within Hours

Putting API keys in AI prompts is riskier than most people assume, and a new test just put numbers on it. Researchers at Dragos sent nearly two million prompts stuffed with fake credentials to AI services, and attackers stole and used a couple hundred of the planted AWS keys. Some of the stolen requests were flagged as zero data retention.

The keys were bait, so nobody lost real money. But the same path would have carried your real keys.

The quick version:

  • Dragos published its findings on November 19, 2026, after about five months of testing.
  • At least three AI hosting providers were breached, and none knew until the researchers told them.
  • Bait AWS keys drove tens of thousands of AWS API calls, with some tested within hours.
  • Zero data retention settings did not stop data from leaking in several cases.

If you use an AI router, reseller, or agent that touches real credentials, the section on what to do this week is the part to read.

How researchers caught API keys in AI prompts being stolen

HD Moore, Chief Research Officer at Dragos, ran the experiment from July to November 2026. Every prompt carried unique bait: an AWS access key, a URL, and a hostname. The AWS keys belonged to empty accounts with full logging turned on.

Because each bait item was unique, any later use pointed back to one specific request. The team could tell which model, router, and privacy setting that request had passed through. They also traced about 2,000 inference routes by embedding image URLs and sending malformed requests to fingerprint each hop.

That design is what makes the results hard to wave away. It isn’t a theory about what might leak. It’s a log of what did.

Three breached providers, and none of them knew

According to the Dragos report, data from at least three hosting providers was exposed, with the earliest incident dating to mid-July. The providers learned about it only when Dragos came forward. The report doesn’t name them.

The largest breach hit a couple hundred AWS keys, each sent once to one provider during late October. Every key sent in those windows was stolen, and some were taken before any model ran, which suggests copying at the provider’s front door.

Attackers moved quickly. Keys were tested within hours, then used to list S3 buckets, read secrets stores, try to enable Bedrock models, and add IAM users. One key planted on October 21 was first used the next day and was still being used three weeks later.

One actor appears to have hit two providers in a single session, and used the ARTEX AI pentest tool on November 1. We covered that tool in our look at the European Commission cyberattack.

Where the leaks happened

The breaches weren’t the only problem. The table below sorts the main leak paths the report describes, so you can see which one applies to how you use AI.

Leak path What Dragos saw Who is exposed
Hosting provider breach Attackers copied requests and used stolen AWS keys within hours Anyone sending real secrets through those providers
Marketplace resellers Resellers could view and keep prompts through standard request logging, and bait URLs were opened about a day and a half later Users of cheap reseller routes
Chinese AI lab scraper Fetched secret URLs from over half of prompts sent to its models, including about two-thirds of those marked no data collection Users of that lab’s models and US hosts reselling them
Large US provider crawler Kept crawling a secret URL more than two months after one call Users who include links in prompts

The last two rows matter because they involve no hacking at all. The data flowed through normal business relationships.

Why a zero data retention flag didn’t save the prompts

Zero data retention, or ZDR, is a setting that tells a provider not to keep your prompts. Dragos found that some stolen requests in two of the breaches were marked ZDR. A flag can’t protect data from an attacker who already sits on the machine reading it.

The report also says privacy flags only bind the first hop of a route. If your request passes through a router and then another host, you can’t easily verify the flag followed it. One seeded link from a ZDR-flagged prompt showed up in a Feishu chat 24 days later.

Treat a ZDR setting as a policy promise, not a security control.

What to do this week if you send secrets to AI tools

Dragos and other write-ups of the study give a handful of practical steps. Here’s the short list worth acting on.

  • Rotate any key that has appeared in a prompt, a pasted log, or a file an AI agent reads.
  • Skip reseller marketplaces for anything touching real data, and pick your upstream provider yourself if you use a router.
  • Plant your own canary credentials, such as free tokens from Canarytokens, and treat any use as an incident.
  • Turn on provider secret-filtering, but don’t rely on it, since it won’t catch sensitive data that doesn’t look like an API key.
  • Use short-lived, narrowly scoped credentials so a stolen key expires or does little damage.

Credential theft keeps showing up in our coverage. If you want a refresher on cleanup, see what to rotate after the Railway breach.

Frequently Asked Questions

Were real users’ keys stolen in this test?

No. The AWS keys were bait tied to empty, fully logged accounts. The point was to show what happens to real keys that travel the same routes.

Which AI providers were breached?

Dragos didn’t name the three hosting providers in its report. It says it is working with about a dozen providers, and that one has published a preliminary security notice.

Does zero data retention protect my prompts?

Not reliably. Some stolen requests were flagged ZDR, and Dragos says such flags only bind the first hop of a route.

Is going straight to a big provider safer than using a router?

Dragos recommends it as the smaller exposure: one contract and one privacy policy. Self-hosting is the only option where no third party sees your prompts, but it costs real hardware money.

My take: stop treating the prompt box as a safe place

If a secret is live, don’t paste it into an AI tool, and don’t leave it in a file an agent will read. Move credentials to a vault, hand agents short-lived tokens, and assume anything that leaves your machine can be copied. That’s less convenient for a week and far cheaper than rotating keys after a breach you didn’t know about.


Comments

Leave a Reply

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