What happens when an AI agent’s credential ends up in a prompt?

Short answer: assume the prompt gets copied, and ask what the credential inside it is worth to whoever copies it. In a study published in November 2026, Dragos put canary credentials into about two million prompts sent to AI services and watched attackers steal them and test them, in some cases within hours. A long-lived key with wide reach gives whoever copies it a whole account to explore. A credential that is scoped to what a person approved, time-limited and revocable limits what a copy can do. It does not stop the copy.

On November 19, HD Moore, Chief Research Officer at Dragos, published the results. Between July and November his team sent roughly two million prompts to widely used AI services. Each carried unique URLs and canary credentials that no legitimate system would ever use. Any later use of one meant someone, somewhere in the chain, had seen the prompt. Ars Technica covered it the same week. What follows is Dragos’s measurement, in their words where we quote, and our reading of what it means for anyone who lets an AI agent hold a credential.

What did Dragos find?

Three things. Attackers were stealing data from three hosting providers, copying the requests those providers received. Resellers on an AI inference marketplace could read and keep customer prompts with ordinary request logging, no exploit needed. And in multiple cases providers appeared not to honor privacy settings such as Zero Data Retention (ZDR).

The first finding matters most here. Dragos says the largest breach involved a couple hundred of its AWS keys, each sent in exactly one request, all within a few short windows in late October. Every request sent during those windows was stolen. Some of the stolen keys came from requests the provider rejected before a model ever ran, which Dragos reads as an attacker copying requests at the provider’s front door. In the other two breaches, some stolen requests were marked ZDR. In Moore’s words, “A privacy flag doesn’t help when the attacker is already inside.” Dragos says none of the three providers knew about its breach until Dragos told them.

The follow-up is still moving. As read on November 24, 2026, the AI router OpenRouter says the findings showed no breach of its own systems, that it has off-boarded three providers and removed 125 endpoints from Zero Data Retention eligibility, and that it has notified potentially affected customers. It keeps a list of the security notices providers have published.

What did the attackers do with the stolen credentials?

They moved fast and they explored. Dragos says the attackers tested each key to see if it was live, in some cases within a few hours of the request. Then they listed S3 buckets and searched Secrets Manager and Parameter Store. Then they tried to enable hosted models in AWS Bedrock, create Bedrock API keys and add their own IAM users to keep access. In total the bait keys were used for tens of thousands of AWS API calls.

One key, seeded on October 21, was first used the next day and was still in use three weeks later. That is the number to sit with. The copy was cheap to make, and it stayed usable for as long as the original credential stayed valid.

Can you keep credentials out of prompts?

Not reliably. Dragos is blunt about it: “AI agents will happily send whatever they can read, including credentials.” Its list of defenses is sensible. Host the model yourself if you can afford it, go straight to a first-tier provider, pick your routers and their upstream providers deliberately, seed your own canaries, and turn on secret filtering. On filtering, Dragos adds that it “can’t hurt, but it’s not a panacea” because plenty of sensitive prompt data is not shaped like an API key.

Hosting the model yourself is, in Dragos’s words, “the only option where nobody else gets to read your prompts,” and Dragos notes the hardware is not cheap. Every other step shrinks the number of parties who can read a prompt without bringing it to zero. An agent that reads an environment variable, a config file or a tool response can put the contents in front of every hop on the way to the model. We wrote about the injection side of this in prompt injection is an authorization problem. The Dragos study comes at the same weak spot from the other direction. Nobody had to talk an agent into anything. The secret only had to be in the prompt, which is where it lands whenever an agent sends along what it can read.

So design for the copy. The question to put to every credential an agent can see is simple. If a stranger holds this tomorrow, what can the stranger do, and for how long?

What would a scoped, user-mediated grant change?

Dragos’s bait credentials were AWS keys, so this is not a claim about AWS. AgentAdmit is for app owners and MCP server operators who give their own AI agent scoped access to what they run, and who let their users connect their own agents. The lesson transfers to that case. Had an app given those agents AgentAdmit grants instead of a standing key, a copy of the credential would have been worth less, because of six properties:

  1. The person chooses scope and duration. On an AgentAdmit-hosted consent page the user picks what the agent may do and for how long. A copy carries that choice, not the user’s whole account.
  2. The first credential is short-lived and single-use. The user receives a Connection Token on that page and hands it to their agent. It lasts 15 minutes by default, one hour at most, and any redemption attempt burns it. Once the agent has exchanged it, a copy can no longer be redeemed.
  3. There is no refresh token. The agent exchanges the Connection Token for an Access Token, and the same response lists only the endpoints its scopes cover. The agent cannot extend or widen the grant. Continuing past expiry takes a new grant from the person.
  4. Every call is checked. The app checks each call with AgentAdmit before running it: the scope the call needs, the grant’s expiry, and whether the grant has been revoked. The user can also set call ceilings, daily or lifetime counts, at the time of the grant.
  5. The highest-stakes actions need the person each time. An app owner can mark a scope confirm each time, for actions such as sending money or deleting records. A token alone does not complete such a call. It is refused until a passkey already on file for that user signs a commitment to that exact action on an AgentAdmit page. The app chooses how strong that passkey must be: a user-verified passkey such as Face ID or Touch ID, or only a hardware security key validated against the FIDO Metadata Service.
  6. Revocation is per connection, and calls leave a trail. A person or app owner can revoke one connection without touching the rest. Each verified call writes a tamper-evident audit row. Volume spikes alert the app owner, and behavior that drifts from a connection’s own pattern is flagged for review.

Compare that to the stolen-key story. A key that is still live three weeks after it was copied, and that lets its holder list buckets, search secret stores and try to create new users, is the opposite of this list. See AI agent authorization vs. API keys for the longer comparison, and what is user-mediated authorization for the model underneath.

What would it not change?

Four limits, stated plainly.

First, a copied Access Token still works within its scopes until it expires or someone revokes it. The person picks how long the grant lasts from the options the app offers, from one hour to one year, or until they revoke it. A thief holding a copy can replay it inside that window. The copy carries no way to widen or extend the grant, and a call outside the approved scopes is refused.

Second, the user hands the Connection Token to their agent, so it can pass through a prompt like any other text. Its short life and single use are what limit the damage. They do not keep it out of the prompt. Single use cuts both ways: if a copy were redeemed first, the agent’s own exchange would be refused, which is the signal to revoke that connection.

Third, AgentAdmit does not stop a provider from being breached, and it has no say over how a provider treats a privacy flag. The prompt can still be copied. What changes is the value of the credential inside it. Everything else in the prompt is as exposed as before.

Fourth, none of this replaces the cloud keys, database passwords and other secrets that live outside an app’s agent-access layer. Those still need rotation, least privilege and canaries of their own. The pattern we described earlier holds: attackers go after the credential, and your job is to make the credential worth less.

What should an app owner do this week?

Make a list of every credential your agents, or your users’ agents, can read: environment variables, config files, tool responses, stored tokens. Next to each, write what it reaches and when it expires. Anything that reaches a whole account and has no expiry goes to the top of the fix list. Rotate anything that has appeared in a prompt sent through a third-party provider. Then plant a canary of your own in the context your agents already send, as Dragos suggests, so a copy announces itself.

If agents act in your app, whether they are your own or your users’, put a scoped, time-limited, revocable grant between the agent and the data. That is the part we build. See can you set limits on how much an AI agent uses your access for the ceilings, and how to audit and revoke an AI agent’s access for the cleanup side.

Frequently asked questions

What is a canary credential?

A canary credential is a secret that exists in only one place. If anyone ever uses it, you know that place was exposed. Dragos used unique canary AWS keys, URLs and passwords, each sent in a single prompt, to trace which providers leaked and how the stolen secrets were used.

Does Zero Data Retention protect a credential in a prompt?

Not by itself. Dragos reports that in two of the breaches it found, some stolen requests were marked ZDR, and that in multiple cases providers appeared not to honor privacy settings. A privacy flag is a request about what gets stored. It does not stop an attacker who has already broken in.

Can a scoped token still be stolen from a prompt?

Yes. A scoped, time-limited token can be copied like any text. The difference is what the copy can do. It works only inside the scopes the user approved, until it expires or is revoked, and every call made with it is checked and leaves an audit row.

Why does user-mediated delivery matter if the prompt can be copied anyway?

Because the credential does not travel to the agent through an automated channel such as a redirect or callback, which prompt injection or a misconfiguration can intercept. The person decides what is granted and hands over a single-use token. That gives the person a decision point. It also means the first credential a copy could catch is single-use and short-lived, and the lasting one is limited to what the person approved.

AgentAdmit gives apps and MCP server operators that grant model, for their own AI agent and for the agents their users connect: scoped, time-limited, revocable access that a person controls, checked on every call. Patent pending. See agentadmit.com.

Get new posts by email

One short email when a new post goes live. No spam, unsubscribe anytime.