An injected instruction is only as dangerous as what the agent can reach. A manipulated agent with no credentials can embarrass you; one holding a bearer token can hand it to a stranger. Prompt injection credential theft follows a consistent chain: untrusted content reaches the agent, the agent obeys it, and something valuable leaves.
Four documented cases come first, followed by where stolen data goes, which controls limit the harm, and the first hour.
Why Can’t Prompt Injection Be Fixed at the Model Layer?
Instructions and data reach a language model through the same channel, and the model has no reliable way to tell a paragraph it should summarize from one telling it what to do. Any defense that depends on the model’s judgment inherits that weakness. OWASP’s Top 10 for Agentic Applications lists agent goal hijack first, and Akeyless maps each of the OWASP agentic AI risks to identity controls.
A direct prompt injection attack comes from the person typing. Indirect prompt injection arrives inside content the agent processes: a calendar invite, a support ticket, a README, a form field. All four cases below are indirect.
Four Documented Cases
| Case | Disclosed | How the injection arrived | What left | Found by |
|---|---|---|---|---|
| EchoLeak (CVE-2025-32711), Microsoft 365 Copilot | June 2025 | An email Copilot retrieved while answering a related question | Context data, via an auto-loading image link | Aim Labs |
| Comet agentic browser | March 2026 | A calendar invite, triggered when the user handed the meeting to Comet | Local files; in a demo, a 1Password vault login | Zenity Labs |
| AWS Bedrock AgentCore harness | September 2026 | A hidden HTML comment in a support ticket | A service account’s bearer token | Unit 42 |
| ShareLeak (CVE-2026-21520), Copilot Studio | April 2026 | A SharePoint form comment posing as a system message | Customer records, sent by email | Capsule Security |
None involved confirmed attacks on real users. Researchers found and disclosed each, and three have been fixed or mitigated.
EchoLeak (CVE-2025-32711)
Aim Labs phrased the email for its human reader, which slipped it past Copilot’s injection classifier. The data rode out on an image link that loaded automatically through an allowed Microsoft domain. Microsoft rated it 9.3 and fixed it server-side.
Comet Agentic Browser
In research by Zenity Labs, the agent read local files and, in a separate demo, used 1Password’s unlocked extension to open the vault. OECD.AI logged it as an AI incident, and both vendors shipped mitigations in early 2026.
AWS Bedrock AgentCore Harness
In a Unit 42 lab setup, the ticket told the agent to download and run a script. The default-on shell tool shared the harness’s privileges, so the script read the harness’s memory and extracted a Cognito bearer token, later replayed from an outside machine holding no AWS credentials. The researchers needed a more permissive model after the default refused; AWS closed the report as informative.
ShareLeak (CVE-2026-21520)
In a test by Capsule Security, Copilot Studio treated the form comment as trusted instructions, queried connected SharePoint lists, and emailed customer records outside. Being flagged by the platform’s safety layer did not stop the email. Microsoft fixed it in January 2026.
What AgentCore Shows About Vaulted Credentials
The AgentCore token sat in AgentCore Identity, AWS’s managed vault for agent credentials, which is what most guidance recommends. Storage was never the weak point: the exposure began when the harness put the token, in plaintext, into memory the agent’s own shell tool could read.
Unit 42 does not give the token’s lifetime, and for this attack it was not the deciding factor. Expiry limits how long a stolen token can be replayed. It cannot prevent the theft, because the attacker reads the credential during its useful life. Against prompt injection credential theft, short lifetimes shrink the aftermath; keeping the credential out of anything the agent can execute or inspect removes the target.
| THE QUESTION TO ASK A vault protects a credential until something retrieves it. Where does the retrieved value live next, and can the agent reach that place? |
Where Does the Stolen Data Go?
AI data exfiltration uses channels the agent already has. Watch these four:
- Outbound HTTP from any tool the agent may call, the way Comet’s file leak left.
- Rendered images or links whose URLs carry encoded data, the route EchoLeak used.
- Email, chat, and connector sends the agent is permitted to make, as in ShareLeak.
- Writes to a shared memory store or vector database that another agent reads later.
What Contains the Damage?
Guardrails reduce how often injection succeeds; ShareLeak shows they do not govern what happens after. Containment, in order of effect:
- Never let credentials reach the agent’s runtime. A broker that injects them in transit leaves nothing in memory to read, the design Akeyless SecretlessAI uses to keep the credential out of the agent.
- Issue per-task access. Tools that scope access to the task mean a successful injection opens one thing, briefly, and zero standing privileges leave nothing open between tasks.
- Allowlist egress, so AI data exfiltration has no destination to reach.
- Put a person in front of irreversible steps, such as sending funds, sharing externally, or changing who can sign in.
- Log prompt, intent, decision, and action for every step, so responders can size the damage. See what the agent does next for control after sign-in, part of securing LLM applications end to end.
Your First Hour After an Incident
- List every credential the agent could resolve that session, not only the suspect one.
- Revoke each at its source. A scheduled rotation is too slow for a credential an attacker already holds.
- Pull the audit trail and look for use that breaks the agent’s usual pattern: new source addresses, odd hours, unfamiliar endpoints.
- Preserve the context window, tool-call logs, and memory writes before retention deletes them.
For one outside the lab, see our analysis of a real credential-driven breach.
FAQs About Prompt Injection Credential Theft
What Is Prompt Injection?
A prompt injection attack smuggles instructions into text a language model processes, so the model follows the attacker instead of its user, whether typed directly or hidden in content the agent reads.
Can Prompt Injection Steal API Keys?
Yes, if the agent can reach them. API keys in environment variables, config files, context, or process memory are readable by an agent told to look. An agent that never holds a key has none to give up.
Do Short-Lived Tokens Stop Prompt Injection Credential Theft?
No. They shorten the replay window, but prompt injection credential theft happens while the token is valid. Short-lived credentials work best combined with keeping the token out of the agent’s reach entirely.
What Is Indirect Prompt Injection?
Injection delivered through content instead of typed by the attacker: an email, an invite, a ticket, a shared document. The attacker never talks to the agent, and the victim may never see the malicious text.
How Do You Detect That an Agent Has Been Hijacked?
Watch for behavior that departs from its task: rarely used tools, new domains, unusual data volumes, odd hours. Detection depends on per-agent attribution, since an anomaly only shows in an agent you can tell apart from others.