Researchers described how an external user with only chat access to an Amazon Bedrock AgentCore agent could prompt it to fetch a cloud credential endpoint and inadvertently reveal temporary AWS credentials. Those credentials could then be used to enumerate other agents, access container images, read user sessions (conversations), and even alter agent memory and behavior across future sessions due to overly broad default permissions.
How the attack worked
Researchers showed that an external user with only chat access to an Amazon Bedrock AgentCore agent could manipulate it into leaking cloud credentials. The attacker simply asked the agent to retrieve and summarize a URL, but the URL pointed to a cloud instance metadata endpoint rather than ordinary web content. The agent, trying to be helpful, fetched the endpoint and returned data from the Instance Metadata Service, which included the agent's own temporary AWS credentials. No malware, phishing email, or exploit chain was required, just a carefully worded prompt.
Why it succeeded
Several conditions combined to make this possible. AgentCore was using IMDSv1 at the time, which is more exposed to this kind of server-side request forgery style abuse than IMDSv2. Network isolation within the agent's execution environment was also weak enough that the agent could be directed to reach the metadata service at all. Once credentials were obtained, the damage extended far beyond the single agent because the default AgentCore IAM role was overpermissioned. Rather than being scoped to one agent, it covered all AgentCore resources in the region, allowing the credentials to enumerate other agents, read sessions, write memories, and fetch secrets from AWS Secrets Manager.
What to watch for
- Prompts asking an agent to fetch a 'credential endpoint' or return 'raw JSON' instead of normal web content
- Requests for internal infrastructure metadata disguised as routine URL summarization
- Temporary credentials being used from unfamiliar devices or locations
- Unexpected enumeration of multiple agents across an account or region
- Unusual container image pulls or containers run as root to inspect source code
- Cross-user or cross-agent memory writes that persist across sessions without an approved change
How to build resistance
Organizations deploying public-facing AI agents should treat chat access as an external attack surface. Agents should be blocked or tightly restricted from fetching internal URLs or infrastructure metadata, and IMDSv2 should be enforced so credentials cannot be trivially extracted through this path. Execution roles for agents need least-privilege scoping tied to a single agent rather than broad regional access, so that a single credential leak cannot cascade into control over an entire fleet of agents. Monitoring should also focus on detecting unusual use of temporary credentials, including resource enumeration, container image pulls, and unexpected memory or session writes, since these are the signals that follow an initial credential theft like the one described here.
Key findings
- A user with chat access could ask an AgentCore-hosted agent to fetch a URL that was actually a credential endpoint, resulting in disclosure of temporary credentials from the Instance Metadata Service (IMDS).
- At the time described, AgentCore used IMDSv1, increasing exposure to IMDS credential theft compared with IMDSv2.
- Stolen temporary credentials could be used to enumerate other agents in the same AWS account/region, access Amazon ECR images, and inspect source code by running containers as root.
- Researchers stated weak network isolation in the Firecracker MicroVM allowed an attacker to direct the agent to perform SSRF-style requests to IMDS.
- Over-permissioned default AgentCore IAM role allowed broad actions across regional AgentCore resources, including reading sessions, writing memories, launching agents, and fetching secrets from AWS Secrets Manager.
- Zenity reported the issue to AWS in Dec 2025; AWS updated AgentCore to use IMDSv2 as of Feb 14, 2026; Zenity later observed permissions issues persisted until later remediation in 2026.
Who’s being targeted
- Commonly targeted roles: AI/ML Engineering, Cloud Engineering, Security Engineering, AI Product Owners, IT Leadership.
- Affected industries: Cloud service providers, Organizations deploying AI agents/chatbots, Software/SaaS providers.
- Attack channels: website.
- Impersonated: N/A (external user abusing agent chat prompts), N/A (use of stolen credentials), N/A (abuse of over-permissioned role with stolen credentials).
Red flags to watch for
- Request asks for a 'credential endpoint' and 'raw JSON' rather than normal web content
- Agent is being asked to retrieve internal infrastructure metadata rather than public information
- The response includes security tokens/temporary credentials
- Temporary credentials being used from an unusual device/location ('loaded them onto his local machine')
- Unexpected enumeration of multiple agents across a region
- Unusual container image pulls and local execution 'as root'
- Cross-user/cross-agent memory changes coming from an unexpected principal
- Agent behavior changes persisting across sessions without an approved change
- API activity that writes memories or accesses sessions at regional scope
Frequently asked questions
How did a single prompt lead to credential theft in AWS AgentCore?
A user asked the agent to fetch and summarize a URL that was actually a cloud instance metadata endpoint, and the agent returned temporary AWS credentials in raw JSON.
What could an attacker do with the stolen AgentCore credentials?
The temporary credentials allowed enumeration of other agents in the same AWS account and region, access to container images in Amazon ECR, and the ability to read sessions and write persistent agent memories.
Was this an IMDSv1 or IMDSv2 issue?
At the time of the research, AgentCore used IMDSv1, which increased exposure to this type of credential theft; AWS later updated AgentCore to use IMDSv2 exclusively.
Why were the stolen credentials so powerful?
The default AgentCore IAM role was scoped broadly to all AgentCore resources in a region rather than a single agent, so anyone holding the credentials could launch agents, read sessions, write memories, and fetch secrets.
Read the video transcript
Imagine this: one chat prompt to a public AI agent, and your AWS AgentCore credentials are gone. Bob asked the agent to 'summarize' a URL that was actually an AWS Instance Metadata Service credential endpoint, in raw JSON. The AgentCore agent, running on IMDSv1, happily fetched the IMDS URL and replied with temporary AWS credentials. With those over-permissioned AgentCore credentials, Bob loaded them on his laptop, enumerated other agents in that AWS region, pulled Amazon ECR images, ran containers as root, and could even read sessions and write agent memories. Here’s the move: if your agent can browse, block it from ever reaching IMDS or internal credential endpoints, treat its chat like an external attacker sitting at your browser.